-
Notifications
You must be signed in to change notification settings - Fork 12k
run e2e legacy tests under bazel #23074
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
1cfd471
to
52f1c3b
Compare
73b5603
to
f7210a0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM though still other comments that appear to be unaddressed.
I think those were all addressed offline and not in the comments here, just no one had pressed resolve. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One comment otherwise LGTM. Can you also squash please?
Using execPath ensures the child processes are the same node binary without depending on PATH.
fixup: add ChromeHeadlessNoSandbox browser to to karma builder
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
This runs the legacy-cli/e2e tests via bazel using the bazel built npm packages from
packages/**
.After all the pre-factors it's mainly just build config and a few code changes to use the bazel environment vars if present. This can be simplified if the non-bazel versions are dropped in the future. Currently all the CI jobs are prefixed with
bazel-
.Build targets / API:
There are 9 bazel targets invoking the e2e tests with different configurations:
//tests/legacy-cli:e2e.{npm,yarn,esbuild,saucelabs}
: configured like CI today//tests/legacy-cli:e2e.snapshot.{npm,yarn,esbuild,saucelabs}
: ^ using snapshots//tests/legacy-cli:e2e
: nothing pre-configured, does not run by default or on CI, is designed to be run and configured manually with bazel cli args.With any of these you can:
bazel test
to run as a bazel testbazel run
to do the equivalent of--debug
and remain running on failure--test_filters="..."
which essentially does the e2e_runner--glob="..."
--test_arg="..."
to specify additional e2e_runner args,--glob
would work here tooSharding
Today e2e tests have
--shard
and--nb-shards
cli params which circleci sets based on theparallelism
config.Now those cli args are defaulted based on the bazel environment variables set by
nodejs_test(shard_count)
and/or theE2E_SHARD_TOTAL
+E2E_SHARD
environment variables I added. This way both bazel and circleci sharding can be combined into one (bazel shards via processes on one circleci environment, circleci sharding in isolated environments).Prefactors: