Skip to content

Commit 51a488d

Browse files
committed
fixup! test: run legacy-cli e2e tests via bazel
1 parent 6ad1501 commit 51a488d

File tree

2 files changed

+19
-29
lines changed

2 files changed

+19
-29
lines changed

.circleci/dynamic_config.yml

Lines changed: 17 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,19 @@ var_3_all_major: &all_nodeversion_major ['14', '16']
3535
# https://circleci.com/blog/deep-diving-into-circleci-workspaces/
3636
var_4: &workspace_location .
3737
# Filter to only release branches on a given job.
38-
var_5: &only_release_branches
38+
var_5_only_releases: &only_release_branches
3939
filters:
4040
branches:
4141
only:
4242
- main
4343
- /\d+\.\d+\.x/
44+
var_5_only_snapshots: &only_snapshot_branches
45+
filters:
46+
branches:
47+
only:
48+
- main
49+
# This is needed to run this steps on Renovate PRs that amend the snapshots package.json
50+
- /^pull\/.*/
4451

4552
var_6: &only_pull_requests
4653
filters:
@@ -50,7 +57,6 @@ var_6: &only_pull_requests
5057

5158
# All e2e test suites
5259
var_7: &all_e2e_subsets ['npm', 'esbuild', 'yarn']
53-
var_8: &all_e2e_build_types ['e2e', 'snapshot']
5460

5561
# Executor Definitions
5662
# https://circleci.com/docs/2.0/reusing-config/#authoring-reusable-executors
@@ -329,10 +335,9 @@ jobs:
329335
executor: bazel-executor
330336
parallelism: 8
331337
parameters:
332-
build_type:
333-
type: enum
334-
enum: *all_e2e_build_types
335-
default: 'e2e'
338+
snapshots:
339+
type: boolean
340+
default: false
336341
subset:
337342
type: enum
338343
enum: *all_e2e_subsets
@@ -343,8 +348,8 @@ jobs:
343348
- setup_bazel_rbe
344349
- run: mkdir /mnt/ramdisk/e2e
345350
- run:
346-
name: Test << parameters.build_type >> << parameters.subset >>
347-
command: yarn bazel test --define=E2E_TEMP=/mnt/ramdisk/e2e --define=E2E_SHARD_TOTAL=${CIRCLE_NODE_TOTAL} --define=E2E_SHARD_INDEX=${CIRCLE_NODE_INDEX} --config=<< parameters.build_type >> //tests/legacy-cli:e2e.<< parameters.subset >>
351+
name: Execute CLI E2E Tests with << parameters.subset >>
352+
command: yarn bazel test --define=E2E_TEMP=/mnt/ramdisk/e2e --define=E2E_SHARD_TOTAL=${CIRCLE_NODE_TOTAL} --define=E2E_SHARD_INDEX=${CIRCLE_NODE_INDEX} --config=e2e //tests/legacy-cli:e2e<<# parameters.snapshots >>.snapshots<</ parameters.snapshots >>.<< parameters.subset >>
348353
no_output_timeout: 40m
349354
- store_artifacts:
350355
path: dist/testlogs/tests/legacy-cli/e2e.<< parameters.subset >>
@@ -555,12 +560,7 @@ workflows:
555560
- run: circleci-agent step halt
556561
requires:
557562
- build
558-
filters:
559-
branches:
560-
only:
561-
- main
562-
# This is needed to run this steps on Renovate PRs that amend the snapshots package.json
563-
- /^pull\/.*/
563+
<<: *only_snapshot_branches
564564

565565
# Bazel jobs
566566
# These jobs only really depend on Setup, but the build job is very quick to run (~35s) and
@@ -589,12 +589,7 @@ workflows:
589589
matrix:
590590
parameters:
591591
subset: *all_e2e_subsets
592-
build_type: 'e2e'
593-
filters:
594-
branches:
595-
ignore:
596-
- main
597-
- /\d+\.\d+\.x/
592+
snapshots: false
598593
requires:
599594
- bazel-build
600595

@@ -603,7 +598,7 @@ workflows:
603598
matrix:
604599
parameters:
605600
subset: *all_e2e_subsets
606-
build_type: 'snapshot'
601+
snapshots: true
607602
pre-steps:
608603
- when:
609604
condition:
@@ -616,12 +611,7 @@ workflows:
616611
- run: circleci-agent step halt
617612
requires:
618613
- bazel-build
619-
filters:
620-
branches:
621-
only:
622-
- main
623-
# This is needed to run this steps on Renovate PRs that amend the snapshots package.json
624-
- /^pull\/.*/
614+
<<: *only_snapshot_branches
625615

626616
- bazel-test-browsers:
627617
requires:

tests/legacy-cli/e2e.bzl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ TEST_TAGS = ["no-remote-exec", "requires-network"]
2828
# Subset of tests for yarn/esbuild
2929
BROWSER_TESTS = ["tests/misc/browsers.js"]
3030
YARN_TESTS = ["tests/basic/**", "tests/update/**", "tests/commands/add/**"]
31-
ESBUILD_TESTS = ["tests/basic/**", "tests/build/prod-build.js"]
31+
ESBUILD_TESTS = ["tests/basic/**", "tests/build/prod-build.js", "tests/build/relative-sourcemap.js", "tests/build/styles/scss.js", "tests/build/styles/include-paths.js", "tests/commands/add/add-pwa.js"]
3232

3333
# Tests excluded for esbuild
3434
ESBUILD_IGNORE_TESTS = [
@@ -145,7 +145,7 @@ def _e2e_suite(name, runner, type, data):
145145

146146
# e2e tests of snapshot builds
147147
_e2e_tests(
148-
name = "%s.snapshot.%s" % (name, type),
148+
name = "%s.snapshots.%s" % (name, type),
149149
runner = runner,
150150
size = "enormous",
151151
data = data,

0 commit comments

Comments
 (0)