Skip to content

Commit f69f69e

Browse files
committed
ci: convert bazel jobs to a PR Github Action workflow
The Bazel variants of the existing CircleCI configuration have now been moved to a PR workflow for Github Actions. This is a first step to fully converting to the use of Github Actions within the repository. The non-Bazel jobs currently still executing with CircleCI both for PRs and main CI.
1 parent 025d974 commit f69f69e

File tree

3 files changed

+73
-69
lines changed

3 files changed

+73
-69
lines changed

.circleci/config.yml

Lines changed: 0 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -107,70 +107,6 @@ jobs:
107107
environment:
108108
CHROMIUM_BIN: '/usr/bin/google-chrome'
109109

110-
bazel-build:
111-
<<: *job_defaults
112-
resource_class: large
113-
steps:
114-
- checkout
115-
- restore_cache:
116-
key: *cache_key
117-
- *yarn_install
118-
- run:
119-
command: yarn bazel build //...
120-
environment:
121-
# TODO: Remove when pnpm is exclusively used.
122-
ASPECT_RULES_JS_FROZEN_PNPM_LOCK: '1'
123-
- *save_cache
124-
125-
bazel-test:
126-
<<: *job_defaults
127-
resource_class: large
128-
steps:
129-
- checkout
130-
- restore_cache:
131-
key: *cache_key
132-
- *yarn_install
133-
- run:
134-
command: yarn bazel test --test_tag_filters=-lint,-e2e,-audit //...
135-
environment:
136-
# TODO: Remove when pnpm is exclusively used.
137-
ASPECT_RULES_JS_FROZEN_PNPM_LOCK: '1'
138-
- *save_cache
139-
- store_artifacts:
140-
path: bazel-testlogs/
141-
- store_artifacts:
142-
path: bazel-testlogs/scenes/
143-
144-
bazel-lint:
145-
<<: *job_defaults
146-
resource_class: large
147-
steps:
148-
- checkout
149-
- restore_cache:
150-
key: *cache_key
151-
- *yarn_install
152-
- run: yarn bazel test --test_tag_filters=+lint //...
153-
- *save_cache
154-
- store_artifacts:
155-
path: bazel-testlogs/
156-
- store_artifacts:
157-
path: bazel-testlogs/scenes/
158-
159-
bazel-lighthouse_audits:
160-
<<: *job_defaults
161-
resource_class: xlarge
162-
steps:
163-
- checkout
164-
- restore_cache:
165-
key: *cache_key
166-
- *yarn_install
167-
- run: yarn bazel test --test_tag_filters=+audit //...
168-
- *save_cache
169-
- store_artifacts:
170-
path: bazel-testlogs/
171-
- store_artifacts:
172-
path: bazel-testlogs/scenes/
173-
174110
workflows:
175111
version: 2
176112
default_workflow:
@@ -181,7 +117,3 @@ workflows:
181117
- lighthouse_audits:
182118
requires:
183119
- build
184-
- bazel-build
185-
- bazel-test
186-
- bazel-lighthouse_audits
187-
- bazel-lint

.github/workflows/pr.yml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: Pull Request
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened]
6+
7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.ref }}
9+
cancel-in-progress: true
10+
11+
permissions: {}
12+
13+
defaults:
14+
run:
15+
shell: bash
16+
17+
env:
18+
# TODO: Remove when pnpm is exclusively used.
19+
ASPECT_RULES_JS_FROZEN_PNPM_LOCK: '1'
20+
21+
jobs:
22+
lint:
23+
runs-on: ubuntu-latest
24+
steps:
25+
- name: Initialize environment
26+
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@db91da4e742cd081bfba01db2edc4e816018419b
27+
- name: Install node modules
28+
run: yarn install
29+
- name: Execute Linting
30+
run: yarn bazel test --test_tag_filters=lint //...
31+
32+
build:
33+
runs-on: ubuntu-latest
34+
steps:
35+
- name: Initialize environment
36+
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@db91da4e742cd081bfba01db2edc4e816018419b
37+
- name: Install node modules
38+
run: yarn install
39+
- name: Execute Build
40+
run: yarn bazel build //...
41+
42+
test:
43+
runs-on: ubuntu-latest
44+
steps:
45+
- name: Initialize environment
46+
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@db91da4e742cd081bfba01db2edc4e816018419b
47+
- name: Install node modules
48+
run: yarn install
49+
- name: Execute Tests
50+
run: yarn bazel test --test_tag_filters=-lint,-e2e,-audit //...
51+
- name: Store Test Logs
52+
uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6
53+
with:
54+
name: test-logs
55+
path: bazel-testlogs/
56+
retention-days: 14
57+
58+
lighthouse:
59+
runs-on: ubuntu-latest
60+
steps:
61+
- name: Initialize environment
62+
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@db91da4e742cd081bfba01db2edc4e816018419b
63+
- name: Install node modules
64+
run: yarn install
65+
- name: Execute Lighthouse Audit
66+
run: yarn bazel test --test_tag_filters=audit //...
67+
- name: Store Audit Logs
68+
uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6
69+
with:
70+
name: lighthouse-logs
71+
path: bazel-testlogs/
72+
retention-days: 14

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
20.11.0
1+
20.16.0

0 commit comments

Comments
 (0)