Skip to content

Commit a3264a3

Browse files
committed
fixup! test: run legacy-cli e2e tests via bazel
1 parent 8ad896d commit a3264a3

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 >>
@@ -548,12 +553,7 @@ workflows:
548553
- run: circleci-agent step halt
549554
requires:
550555
- build
551-
filters:
552-
branches:
553-
only:
554-
- main
555-
# This is needed to run this steps on Renovate PRs that amend the snapshots package.json
556-
- /^pull\/.*/
556+
<<: *only_snapshot_branches
557557

558558
# Bazel jobs
559559
# These jobs only really depend on Setup, but the build job is very quick to run (~35s) and
@@ -582,12 +582,7 @@ workflows:
582582
matrix:
583583
parameters:
584584
subset: *all_e2e_subsets
585-
build_type: 'e2e'
586-
filters:
587-
branches:
588-
ignore:
589-
- main
590-
- /\d+\.\d+\.x/
585+
snapshots: false
591586
requires:
592587
- bazel-build
593588

@@ -596,7 +591,7 @@ workflows:
596591
matrix:
597592
parameters:
598593
subset: *all_e2e_subsets
599-
build_type: 'snapshot'
594+
snapshots: true
600595
pre-steps:
601596
- when:
602597
condition:
@@ -609,12 +604,7 @@ workflows:
609604
- run: circleci-agent step halt
610605
requires:
611606
- bazel-build
612-
filters:
613-
branches:
614-
only:
615-
- main
616-
# This is needed to run this steps on Renovate PRs that amend the snapshots package.json
617-
- /^pull\/.*/
607+
<<: *only_snapshot_branches
618608

619609
- bazel-test-browsers:
620610
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)