From 2de9fe31cc16cd5e11ef12db1d04a367a4152ee3 Mon Sep 17 00:00:00 2001 From: Greg Magolan Date: Sat, 6 Apr 2024 12:30:54 -0700 Subject: [PATCH] chore: run all e2e tests on CI (#1609) --- .github/workflows/ci.yaml | 4 ++-- .../snapshots/bzlmod/repositories.bzl | 4 ++-- .../bzlmod/segfault-handler_defs.bzl | 24 ------------------- .../snapshots/wksp/repositories.bzl | 4 ++-- .../snapshots/wksp/segfault-handler_defs.bzl | 24 ------------------- .../snapshots/wksp/repositories.bzl | 4 ++-- .../snapshots/wksp/repositories.bzl | 4 ++-- e2e/vendored_node/WORKSPACE | 19 +++++++++++++++ e2e/webpack_devserver/MODULE.bazel | 1 + e2e/webpack_devserver_esm/MODULE.bazel | 1 + e2e/worker/WORKSPACE | 19 +++++++++++++++ js/private/test/image/checksum.expected | 2 +- .../test/image/custom_owner_app.listing | 2 +- js/private/test/image/default_app.listing | 2 +- 14 files changed, 53 insertions(+), 61 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 212e95ce8..ebee872c0 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -4,9 +4,9 @@ name: CI on: # Triggers the workflow on push or pull request events but only for the main branch push: - branches: [main] + branches: [main, 2.x] pull_request: - branches: [main] + branches: [main, 2.x] # Allows you to run this workflow manually from the Actions tab workflow_dispatch: diff --git a/e2e/gyp_no_install_script/snapshots/bzlmod/repositories.bzl b/e2e/gyp_no_install_script/snapshots/bzlmod/repositories.bzl index 6b0cc7783..a4347a026 100644 --- a/e2e/gyp_no_install_script/snapshots/bzlmod/repositories.bzl +++ b/e2e/gyp_no_install_script/snapshots/bzlmod/repositories.bzl @@ -1,8 +1,8 @@ -"""@generated by npm_translate_lock(name = "npm", pnpm_lock = "//:pnpm-lock.yaml")""" +"""@generated by npm_translate_lock(name = "npm", pnpm_lock = "@@//:pnpm-lock.yaml")""" load("@aspect_rules_js//npm:repositories.bzl", "npm_import") -# Generated npm_import repository rules corresponding to npm packages in //:pnpm-lock.yaml +# Generated npm_import repository rules corresponding to npm packages in @@//:pnpm-lock.yaml # buildifier: disable=function-docstring def npm_repositories(): npm_import( diff --git a/e2e/gyp_no_install_script/snapshots/bzlmod/segfault-handler_defs.bzl b/e2e/gyp_no_install_script/snapshots/bzlmod/segfault-handler_defs.bzl index d655a6089..d00c16a7e 100644 --- a/e2e/gyp_no_install_script/snapshots/bzlmod/segfault-handler_defs.bzl +++ b/e2e/gyp_no_install_script/snapshots/bzlmod/segfault-handler_defs.bzl @@ -140,10 +140,6 @@ def npm_imported_package_store(name): version = "1.3.0", dev = False, tags = ["manual"], - use_declare_symlink = select({ - "@aspect_rules_js//js:allow_unresolved_symlinks": True, - "//conditions:default": False, - }), ) # post-lifecycle target with reference deps for use in terminal target with transitive closure @@ -155,10 +151,6 @@ def npm_imported_package_store(name): dev = False, deps = ref_deps, tags = ["manual"], - use_declare_symlink = select({ - "@aspect_rules_js//js:allow_unresolved_symlinks": True, - "//conditions:default": False, - }), ) # virtual store target with transitive closure of all npm package dependencies @@ -171,10 +163,6 @@ def npm_imported_package_store(name): deps = deps, visibility = ["//visibility:public"], tags = ["manual"], - use_declare_symlink = select({ - "@aspect_rules_js//js:allow_unresolved_symlinks": True, - "//conditions:default": False, - }), ) # filegroup target that provides a single file which is @@ -298,10 +286,6 @@ def npm_imported_package_store(name): dev = False, deps = ref_deps, tags = ["manual"], - use_declare_symlink = select({ - "@aspect_rules_js//js:allow_unresolved_symlinks": True, - "//conditions:default": False, - }), ) # terminal pre-lifecycle target for use in lifecycle build target below @@ -312,10 +296,6 @@ def npm_imported_package_store(name): dev = False, deps = lc_deps, tags = ["manual"], - use_declare_symlink = select({ - "@aspect_rules_js//js:allow_unresolved_symlinks": True, - "//conditions:default": False, - }), ) # lifecycle build action @@ -400,10 +380,6 @@ def npm_link_imported_package_store(name): src = "//:{}".format(store_target_name), visibility = ["//visibility:public"], tags = ["manual"], - use_declare_symlink = select({ - "@aspect_rules_js//js:allow_unresolved_symlinks": True, - "//conditions:default": False, - }), ) # filegroup target that provides a single file which is diff --git a/e2e/gyp_no_install_script/snapshots/wksp/repositories.bzl b/e2e/gyp_no_install_script/snapshots/wksp/repositories.bzl index 6b0cc7783..cfad4a5f6 100644 --- a/e2e/gyp_no_install_script/snapshots/wksp/repositories.bzl +++ b/e2e/gyp_no_install_script/snapshots/wksp/repositories.bzl @@ -1,8 +1,8 @@ -"""@generated by npm_translate_lock(name = "npm", pnpm_lock = "//:pnpm-lock.yaml")""" +"""@generated by npm_translate_lock(name = "npm", pnpm_lock = "@//:pnpm-lock.yaml")""" load("@aspect_rules_js//npm:repositories.bzl", "npm_import") -# Generated npm_import repository rules corresponding to npm packages in //:pnpm-lock.yaml +# Generated npm_import repository rules corresponding to npm packages in @//:pnpm-lock.yaml # buildifier: disable=function-docstring def npm_repositories(): npm_import( diff --git a/e2e/gyp_no_install_script/snapshots/wksp/segfault-handler_defs.bzl b/e2e/gyp_no_install_script/snapshots/wksp/segfault-handler_defs.bzl index 493e7bd2d..b57e45233 100644 --- a/e2e/gyp_no_install_script/snapshots/wksp/segfault-handler_defs.bzl +++ b/e2e/gyp_no_install_script/snapshots/wksp/segfault-handler_defs.bzl @@ -140,10 +140,6 @@ def npm_imported_package_store(name): version = "1.3.0", dev = False, tags = ["manual"], - use_declare_symlink = select({ - "@aspect_rules_js//js:allow_unresolved_symlinks": True, - "//conditions:default": False, - }), ) # post-lifecycle target with reference deps for use in terminal target with transitive closure @@ -155,10 +151,6 @@ def npm_imported_package_store(name): dev = False, deps = ref_deps, tags = ["manual"], - use_declare_symlink = select({ - "@aspect_rules_js//js:allow_unresolved_symlinks": True, - "//conditions:default": False, - }), ) # virtual store target with transitive closure of all npm package dependencies @@ -171,10 +163,6 @@ def npm_imported_package_store(name): deps = deps, visibility = ["//visibility:public"], tags = ["manual"], - use_declare_symlink = select({ - "@aspect_rules_js//js:allow_unresolved_symlinks": True, - "//conditions:default": False, - }), ) # filegroup target that provides a single file which is @@ -298,10 +286,6 @@ def npm_imported_package_store(name): dev = False, deps = ref_deps, tags = ["manual"], - use_declare_symlink = select({ - "@aspect_rules_js//js:allow_unresolved_symlinks": True, - "//conditions:default": False, - }), ) # terminal pre-lifecycle target for use in lifecycle build target below @@ -312,10 +296,6 @@ def npm_imported_package_store(name): dev = False, deps = lc_deps, tags = ["manual"], - use_declare_symlink = select({ - "@aspect_rules_js//js:allow_unresolved_symlinks": True, - "//conditions:default": False, - }), ) # lifecycle build action @@ -400,10 +380,6 @@ def npm_link_imported_package_store(name): src = "//:{}".format(store_target_name), visibility = ["//visibility:public"], tags = ["manual"], - use_declare_symlink = select({ - "@aspect_rules_js//js:allow_unresolved_symlinks": True, - "//conditions:default": False, - }), ) # filegroup target that provides a single file which is diff --git a/e2e/npm_translate_lock/snapshots/wksp/repositories.bzl b/e2e/npm_translate_lock/snapshots/wksp/repositories.bzl index 15722a8aa..43d65a43f 100644 --- a/e2e/npm_translate_lock/snapshots/wksp/repositories.bzl +++ b/e2e/npm_translate_lock/snapshots/wksp/repositories.bzl @@ -1,8 +1,8 @@ -"""@generated by npm_translate_lock(name = "npm", pnpm_lock = "//:pnpm-lock.yaml")""" +"""@generated by npm_translate_lock(name = "npm", pnpm_lock = "@//:pnpm-lock.yaml")""" load("@aspect_rules_js//npm:repositories.bzl", "npm_import") -# Generated npm_import repository rules corresponding to npm packages in //:pnpm-lock.yaml +# Generated npm_import repository rules corresponding to npm packages in @//:pnpm-lock.yaml # buildifier: disable=function-docstring def npm_repositories(): npm_import( diff --git a/e2e/npm_translate_lock_empty/snapshots/wksp/repositories.bzl b/e2e/npm_translate_lock_empty/snapshots/wksp/repositories.bzl index 2c5e8a358..60608e83e 100644 --- a/e2e/npm_translate_lock_empty/snapshots/wksp/repositories.bzl +++ b/e2e/npm_translate_lock_empty/snapshots/wksp/repositories.bzl @@ -1,6 +1,6 @@ -"""@generated by npm_translate_lock(name = "npm", pnpm_lock = "//:pnpm-lock.yaml")""" +"""@generated by npm_translate_lock(name = "npm", pnpm_lock = "@//:pnpm-lock.yaml")""" -# Generated npm_import repository rules corresponding to npm packages in //:pnpm-lock.yaml +# Generated npm_import repository rules corresponding to npm packages in @//:pnpm-lock.yaml # buildifier: disable=function-docstring def npm_repositories(): pass diff --git a/e2e/vendored_node/WORKSPACE b/e2e/vendored_node/WORKSPACE index bf9bddbcf..fbd512df1 100644 --- a/e2e/vendored_node/WORKSPACE +++ b/e2e/vendored_node/WORKSPACE @@ -7,6 +7,25 @@ load("@aspect_rules_js//js:repositories.bzl", "rules_js_dependencies") rules_js_dependencies() +load( + "@aspect_bazel_lib//lib:repositories.bzl", + "register_copy_directory_toolchains", + "register_copy_to_directory_toolchains", + "register_coreutils_toolchains", + "register_tar_toolchains", + "register_yq_toolchains", +) + +register_copy_directory_toolchains() + +register_copy_to_directory_toolchains() + +register_coreutils_toolchains() + +register_tar_toolchains() + +register_yq_toolchains() + load("@bazel_features//:deps.bzl", "bazel_features_deps") bazel_features_deps() diff --git a/e2e/webpack_devserver/MODULE.bazel b/e2e/webpack_devserver/MODULE.bazel index e540e49e0..aff87e261 100644 --- a/e2e/webpack_devserver/MODULE.bazel +++ b/e2e/webpack_devserver/MODULE.bazel @@ -1,3 +1,4 @@ +bazel_dep(name = "aspect_bazel_lib", version = "2.7.0") bazel_dep(name = "bazel_skylib", version = "1.5.0") bazel_dep(name = "rules_go", version = "0.46.0") bazel_dep(name = "aspect_rules_js", version = "0.0.0") diff --git a/e2e/webpack_devserver_esm/MODULE.bazel b/e2e/webpack_devserver_esm/MODULE.bazel index 176b6d1a8..7d5521409 100644 --- a/e2e/webpack_devserver_esm/MODULE.bazel +++ b/e2e/webpack_devserver_esm/MODULE.bazel @@ -1,3 +1,4 @@ +bazel_dep(name = "aspect_bazel_lib", version = "2.7.0") bazel_dep(name = "bazel_skylib", version = "1.5.0") bazel_dep(name = "rules_go", version = "0.46.0") bazel_dep(name = "aspect_rules_js", version = "0.0.0") diff --git a/e2e/worker/WORKSPACE b/e2e/worker/WORKSPACE index fd70c1137..85cb981c6 100644 --- a/e2e/worker/WORKSPACE +++ b/e2e/worker/WORKSPACE @@ -15,6 +15,25 @@ nodejs_register_toolchains( node_version = "14.20.0", ) +load( + "@aspect_bazel_lib//lib:repositories.bzl", + "register_copy_directory_toolchains", + "register_copy_to_directory_toolchains", + "register_coreutils_toolchains", + "register_tar_toolchains", + "register_yq_toolchains", +) + +register_copy_directory_toolchains() + +register_copy_to_directory_toolchains() + +register_coreutils_toolchains() + +register_tar_toolchains() + +register_yq_toolchains() + load("@bazel_features//:deps.bzl", "bazel_features_deps") bazel_features_deps() diff --git a/js/private/test/image/checksum.expected b/js/private/test/image/checksum.expected index 0d74d4040..2658d32bf 100644 --- a/js/private/test/image/checksum.expected +++ b/js/private/test/image/checksum.expected @@ -1,2 +1,2 @@ -6477f43b8663b593b7eb3ba50f7b617849eca2d2ecccdba37a92b0c9faf1226c js/private/test/image/cksum_app.tar +4a332bdfbc2c68da46ff8851a060c04c5e0328c07540c0da992d95e7b0e79ffa js/private/test/image/cksum_app.tar 813d54ae63067f19103e13f616726ff1f32cf8d51e27789b8d31415300f0a69e js/private/test/image/cksum_node_modules.tar diff --git a/js/private/test/image/custom_owner_app.listing b/js/private/test/image/custom_owner_app.listing index 0cfd302af..563c1bf9f 100644 --- a/js/private/test/image/custom_owner_app.listing +++ b/js/private/test/image/custom_owner_app.listing @@ -10,7 +10,7 @@ drwxr-xr-x 100/0 0 1970-01-01 00:00 app/js/private/test/image/bin.ru drwxr-xr-x 100/0 0 1970-01-01 00:00 app/js/private/test/image/bin.runfiles/aspect_rules_js/js/private drwxr-xr-x 100/0 0 1970-01-01 00:00 app/js/private/test/image/bin.runfiles/aspect_rules_js/js/private/test drwxr-xr-x 100/0 0 1970-01-01 00:00 app/js/private/test/image/bin.runfiles/aspect_rules_js/js/private/test/image --r-xr-xr-x 100/0 24130 1970-01-01 00:00 app/js/private/test/image/bin.runfiles/aspect_rules_js/js/private/test/image/bin +-r-xr-xr-x 100/0 23948 1970-01-01 00:00 app/js/private/test/image/bin.runfiles/aspect_rules_js/js/private/test/image/bin drwxr-xr-x 100/0 0 1970-01-01 00:00 app/js/private/test/image/bin.runfiles/aspect_rules_js/js/private/test/image/bin_node_bin -r-xr-xr-x 100/0 133 1970-01-01 00:00 app/js/private/test/image/bin.runfiles/aspect_rules_js/js/private/test/image/bin_node_bin/node -r-xr-xr-x 100/0 20 1970-01-01 00:00 app/js/private/test/image/bin.runfiles/aspect_rules_js/js/private/test/image/main.js diff --git a/js/private/test/image/default_app.listing b/js/private/test/image/default_app.listing index ad75c6876..95aa225fd 100644 --- a/js/private/test/image/default_app.listing +++ b/js/private/test/image/default_app.listing @@ -10,7 +10,7 @@ drwxr-xr-x 0/0 0 1970-01-01 00:00 app/js/private/test/image/bin.ru drwxr-xr-x 0/0 0 1970-01-01 00:00 app/js/private/test/image/bin.runfiles/aspect_rules_js/js/private drwxr-xr-x 0/0 0 1970-01-01 00:00 app/js/private/test/image/bin.runfiles/aspect_rules_js/js/private/test drwxr-xr-x 0/0 0 1970-01-01 00:00 app/js/private/test/image/bin.runfiles/aspect_rules_js/js/private/test/image --r-xr-xr-x 0/0 24130 1970-01-01 00:00 app/js/private/test/image/bin.runfiles/aspect_rules_js/js/private/test/image/bin +-r-xr-xr-x 0/0 23948 1970-01-01 00:00 app/js/private/test/image/bin.runfiles/aspect_rules_js/js/private/test/image/bin drwxr-xr-x 0/0 0 1970-01-01 00:00 app/js/private/test/image/bin.runfiles/aspect_rules_js/js/private/test/image/bin_node_bin -r-xr-xr-x 0/0 133 1970-01-01 00:00 app/js/private/test/image/bin.runfiles/aspect_rules_js/js/private/test/image/bin_node_bin/node -r-xr-xr-x 0/0 20 1970-01-01 00:00 app/js/private/test/image/bin.runfiles/aspect_rules_js/js/private/test/image/main.js