ci: run acceptance tests on saucelabs with ivy (#34277)
Currently we only run Saucelabs on PRs using the legacy View Engine build. Switching that build to Ivy is not trivial and there are various options: 1. Updating the R3 switches to use POST_R3 by default. At first glance, this doesn't look easy because the current ngtsc switch logic seems to be unidirectional (only PRE_R3 to POST_R3). 2. Updating the legacy setup to run with Ivy. This sounds like the easiest solution at first.. but it turns out to be way more complicated. Packages would need to be built with ngtsc using legacy tools (i.e. first building the compiler-cli; and then building packages) and View Engine only tests would need to be determined and filtered out. Basically it will result in re-auditing all test targets. This is contradictory to the fact that we have this information in Bazel already. 3. Creating a new job that runs tests on Saucelabs with Bazel. We specify fine-grained test targets that should run. This would be a good start (e.g. acceptance tests) and also would mean that we do not continue maintaining the legacy setup.. This commit implements the third option as it allows us to move forward with the general Bazel migration. We don't want to spend too much time on our legacy setup since it will be removed anyway in the future. PR Close #34277
This commit is contained in:

committed by
Kara Erickson

parent
3bbd12d560
commit
6d3a25d897
33
BUILD.bazel
33
BUILD.bazel
@ -47,17 +47,28 @@ filegroup(
|
||||
],
|
||||
)
|
||||
|
||||
# To run a karma_web_test target locally on SauceLabs:
|
||||
# 1) have SAUCE_USERNAME, SAUCE_ACCESS_KEY (and optionally a SAUCE_TUNNEL_IDENTIFIER) set in your environment
|
||||
# 2) open a sauce connection with `./scripts/saucelabs/start-tunnel.sh`
|
||||
# NOTE: start-tunnel.sh uses `node_modules/sauce-connect` which is current linux specific:
|
||||
# "sauce-connect": "https://saucelabs.com/downloads/sc-4.5.3-linux.tar.gz".
|
||||
# On OSX or Windows you'll need to use the appropriate sauce-connect binary.
|
||||
# 3) run target with `yarn bazel test --config=saucelabs <target>`
|
||||
# NOTE: --config=saucelabs is required as it makes the SAUCE_XXX environment variables available to
|
||||
# the action. See /.bazelrc.
|
||||
# To run a karma_web_test target manually, run the "./scripts/saucelabs/run-bazel-via-tunnel.sh"
|
||||
# script. Note: If you are on MacOS or Windows, you need to manually start the Saucelabs tunnel
|
||||
# because the script only supports the linux Saucelabs tunnel binary. We combine all tests into
|
||||
# a single "karma_web_test" target because running them as separate targets in parallel can result
|
||||
# in to too many browsers being acquired at the same time. This will then result in tests being
|
||||
# flaky. This target runs in CI with Saucelabs and Ivy.
|
||||
karma_web_test(
|
||||
name = "test_web_all",
|
||||
name = "saucelabs_unit_tests",
|
||||
tags = [
|
||||
"local",
|
||||
"manual",
|
||||
"saucelabs",
|
||||
],
|
||||
deps = [
|
||||
"//packages/core/test/acceptance:acceptance_lib",
|
||||
],
|
||||
)
|
||||
|
||||
karma_web_test(
|
||||
# This target runs in CI with View Engine as a Saucelabs and Bazel proof-of-concept. It's a
|
||||
# subset of the legacy saucelabs tests.
|
||||
name = "saucelabs_unit_tests_poc",
|
||||
tags = [
|
||||
"local",
|
||||
"manual",
|
||||
@ -65,7 +76,7 @@ karma_web_test(
|
||||
],
|
||||
deps = [
|
||||
# We combine all tests into a single karma_web_test target
|
||||
# as running them as seperate targets in parallel leads to too many
|
||||
# as running them as separate targets in parallel leads to too many
|
||||
# browsers being acquired at once in SauceLabs and the tests flake out
|
||||
# TODO: this is an example subset of tests below, add all remaining angular tests
|
||||
"//packages/common/http/test:test_lib",
|
||||
|
Reference in New Issue
Block a user