Skip to content

Commit e733d70

Browse files
josephperrottclydin
authored andcommitted
ci: migrate test job to GHA
Migrate node version tests on Github Actions from CircleCI
1 parent dadd89f commit e733d70

File tree

2 files changed

+25
-42
lines changed

2 files changed

+25
-42
lines changed

.circleci/dynamic_config.yml

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -200,38 +200,6 @@ jobs:
200200
command: yarn bazel build //...
201201
- fail_fast
202202

203-
test:
204-
executor: bazel-executor
205-
parameters:
206-
nodeversion:
207-
type: string
208-
default: *default_nodeversion_major
209-
steps:
210-
- custom_attach_workspace
211-
- setup_bazel_rbe
212-
- when:
213-
# The default nodeversion runs all *excluding* other versions
214-
condition:
215-
equal: [*default_nodeversion_major, << parameters.nodeversion >>]
216-
steps:
217-
- run:
218-
command: yarn bazel test --test_tag_filters=-node18,-node<< parameters.nodeversion >>-broken //packages/...
219-
# This timeout provides time for the actual tests to timeout and report status
220-
# instead of CircleCI stopping the job without test failure information.
221-
no_output_timeout: 40m
222-
- when:
223-
# Non-default nodeversion runs only that specific nodeversion
224-
condition:
225-
not:
226-
equal: [*default_nodeversion_major, << parameters.nodeversion >>]
227-
steps:
228-
- run:
229-
command: yarn bazel test --test_tag_filters=node<< parameters.nodeversion >>,-node<< parameters.nodeversion >>-broken //packages/...
230-
# This timeout provides time for the actual tests to timeout and report status
231-
# instead of CircleCI stopping the job without test failure information.
232-
no_output_timeout: 40m
233-
- fail_fast
234-
235203
e2e-tests:
236204
executor: bazel-executor
237205
parallelism: 8
@@ -366,16 +334,6 @@ workflows:
366334
# Linux jobs
367335
- setup
368336

369-
# These jobs only really depend on Setup, but the build job is very quick to run (~35s) and
370-
# will catch any build errors before proceeding to the more lengthy and resource intensive
371-
- test:
372-
name: test-node<< matrix.nodeversion >>
373-
matrix:
374-
parameters:
375-
nodeversion: ['16', '18']
376-
requires:
377-
- build
378-
379337
# Bazel jobs
380338
- build:
381339
requires:

.github/workflows/ci.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,28 @@ jobs:
6464
run: yarn install --frozen-lockfile
6565
- name: Build all buildable targets
6666
run: yarn bazel build //...
67+
68+
test:
69+
runs-on: ubuntu-latest
70+
env:
71+
defaultVersion: 16
72+
strategy:
73+
matrix:
74+
version: [16, 18]
75+
steps:
76+
- name: Initialize environment
77+
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@0109d498b0f6aae418ed4924a5e5c65695f0ac61
78+
with:
79+
node-version: ${{ matrix.version }}
80+
- name: Setup Bazel
81+
uses: angular/dev-infra/github-actions/bazel/setup@0109d498b0f6aae418ed4924a5e5c65695f0ac61
82+
- name: Setup Bazel RBE
83+
uses: angular/dev-infra/github-actions/bazel/configure-remote@0109d498b0f6aae418ed4924a5e5c65695f0ac61
84+
- name: Install node modules
85+
run: yarn install --frozen-lockfile
86+
- if: matrix.version == env.defaultVersion
87+
name: Run tests for default node version
88+
run: yarn bazel test --test_tag_filters=-node18,-node16-broken //packages/...
89+
- if: matrix.version != env.defaultVersion
90+
name: Run tests for non-default node version
91+
run: yarn bazel test --test_tag_filters=node18,-node18-broken //packages/...

0 commit comments

Comments
 (0)