Skip to content

Commit 009812b

Browse files
committed
ci: split ci into privileged and unprivileged workflows (angular#55907)
Split the workflows to prevent unexpected overlap between environments. PR Close angular#55907
1 parent d62dc97 commit 009812b

11 files changed

+223
-106
lines changed

.github/workflows/adev-preview-build.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,16 @@ jobs:
2121
(github.event.action == 'synchronize' && contains(github.event.pull_request.labels.*.name, 'adev: preview'))
2222
steps:
2323
- name: Initialize environment
24-
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@8b117748ae8243f98d261a9731908867b8e3d876
24+
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@89624a6442b75b5cda33c5e9b5c8c4f87ca4f13d
2525
- name: Setup Bazel
26-
uses: angular/dev-infra/github-actions/bazel/setup@8b117748ae8243f98d261a9731908867b8e3d876
26+
uses: angular/dev-infra/github-actions/bazel/setup@89624a6442b75b5cda33c5e9b5c8c4f87ca4f13d
2727
- name: Setup Bazel RBE
28-
uses: angular/dev-infra/github-actions/bazel/configure-remote@8b117748ae8243f98d261a9731908867b8e3d876
28+
uses: angular/dev-infra/github-actions/bazel/configure-remote@89624a6442b75b5cda33c5e9b5c8c4f87ca4f13d
2929
- name: Install node modules
3030
run: yarn install --frozen-lockfile
3131
- name: Build adev to ensure it continues to work
3232
run: yarn bazel build //adev:build
33-
- uses: angular/dev-infra/github-actions/previews/pack-and-upload-artifact@8b117748ae8243f98d261a9731908867b8e3d876
33+
- uses: angular/dev-infra/github-actions/previews/pack-and-upload-artifact@89624a6442b75b5cda33c5e9b5c8c4f87ca4f13d
3434
with:
3535
workflow-artifact-name: 'adev-preview'
3636
pull-number: '${{github.event.pull_request.number}}'

.github/workflows/adev-preview-deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
npx -y firebase-tools@latest target:clear --config adev/firebase.json --project ${{env.PREVIEW_PROJECT}} hosting angular-docs
4141
npx -y firebase-tools@latest target:apply --config adev/firebase.json --project ${{env.PREVIEW_PROJECT}} hosting angular-docs ${{env.PREVIEW_SITE}}
4242
43-
- uses: angular/dev-infra/github-actions/previews/upload-artifacts-to-firebase@8b117748ae8243f98d261a9731908867b8e3d876
43+
- uses: angular/dev-infra/github-actions/previews/upload-artifacts-to-firebase@89624a6442b75b5cda33c5e9b5c8c4f87ca4f13d
4444
with:
4545
github-token: '${{secrets.GITHUB_TOKEN}}'
4646
workflow-artifact-name: 'adev-preview'

.github/workflows/assistant-to-the-branch-manager.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ jobs:
1616
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
1717
with:
1818
persist-credentials: false
19-
- uses: angular/dev-infra/github-actions/branch-manager@8b117748ae8243f98d261a9731908867b8e3d876
19+
- uses: angular/dev-infra/github-actions/branch-manager@89624a6442b75b5cda33c5e9b5c8c4f87ca4f13d
2020
with:
2121
angular-robot-key: ${{ secrets.ANGULAR_ROBOT_PRIVATE_KEY }}

.github/workflows/benchmark-compare.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838

3939
- uses: ./.github/actions/yarn-install
4040

41-
- uses: angular/dev-infra/github-actions/bazel/configure-remote@8b117748ae8243f98d261a9731908867b8e3d876
41+
- uses: angular/dev-infra/github-actions/bazel/configure-remote@89624a6442b75b5cda33c5e9b5c8c4f87ca4f13d
4242
with:
4343
bazelrc: ./.bazelrc.user
4444

.github/workflows/ci.yml

Lines changed: 24 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ on:
55
branches:
66
- main
77
- '[0-9]+.[0-9]+.x'
8-
pull_request:
9-
types: [opened, synchronize, reopened]
108

119
concurrency:
1210
group: ${{ github.workflow }}-${{ github.ref }}
@@ -23,12 +21,9 @@ jobs:
2321
runs-on: ubuntu-latest
2422
steps:
2523
- name: Initialize environment
26-
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@8b117748ae8243f98d261a9731908867b8e3d876
24+
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@89624a6442b75b5cda33c5e9b5c8c4f87ca4f13d
2725
with:
2826
cache-node-modules: true
29-
node-module-directories: |
30-
./node_modules
31-
./aio/node_modules
3227
- name: Install node modules
3328
run: yarn install --frozen-lockfile
3429
- name: Install node modules in aio
@@ -43,28 +38,18 @@ jobs:
4338
run: yarn -s ng-dev ngbot verify
4439
- name: Confirm code builds with typescript as expected
4540
run: yarn -s check-tooling-setup
46-
- name: Check commit message
47-
# Commit message validation is only done on pull requests as its too late to validate once
48-
# it has been merged.
49-
if: github.event_name == 'pull_request'
50-
run: yarn ng-dev commit-message validate-range ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }}
51-
- name: Check code format
52-
# Code formatting checks are only done on pull requests as its too late to validate once
53-
# it has been merged.
54-
if: github.event_name == 'pull_request'
55-
run: yarn ng-dev format changed --check ${{ github.event.pull_request.base.sha }}
5641

5742
devtools:
5843
runs-on: ubuntu-latest
5944
steps:
6045
- name: Initialize environment
61-
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@8b117748ae8243f98d261a9731908867b8e3d876
46+
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@89624a6442b75b5cda33c5e9b5c8c4f87ca4f13d
6247
with:
6348
cache-node-modules: true
6449
- name: Setup Bazel
65-
uses: angular/dev-infra/github-actions/bazel/setup@8b117748ae8243f98d261a9731908867b8e3d876
50+
uses: angular/dev-infra/github-actions/bazel/setup@89624a6442b75b5cda33c5e9b5c8c4f87ca4f13d
6651
- name: Setup Bazel RBE
67-
uses: angular/dev-infra/github-actions/bazel/configure-remote@8b117748ae8243f98d261a9731908867b8e3d876
52+
uses: angular/dev-infra/github-actions/bazel/configure-remote@89624a6442b75b5cda33c5e9b5c8c4f87ca4f13d
6853
- name: Install node modules
6954
run: yarn install --frozen-lockfile
7055
- name: Run unit tests
@@ -76,13 +61,13 @@ jobs:
7661
runs-on: ubuntu-latest-4core
7762
steps:
7863
- name: Initialize environment
79-
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@8b117748ae8243f98d261a9731908867b8e3d876
64+
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@89624a6442b75b5cda33c5e9b5c8c4f87ca4f13d
8065
with:
8166
cache-node-modules: true
8267
- name: Setup Bazel
83-
uses: angular/dev-infra/github-actions/bazel/setup@8b117748ae8243f98d261a9731908867b8e3d876
68+
uses: angular/dev-infra/github-actions/bazel/setup@89624a6442b75b5cda33c5e9b5c8c4f87ca4f13d
8469
- name: Setup Bazel Remote Caching
85-
uses: angular/dev-infra/github-actions/bazel/configure-remote@8b117748ae8243f98d261a9731908867b8e3d876
70+
uses: angular/dev-infra/github-actions/bazel/configure-remote@89624a6442b75b5cda33c5e9b5c8c4f87ca4f13d
8671
- name: Install node modules
8772
run: yarn install --frozen-lockfile --network-timeout 100000
8873
- name: Run CI tests for framework
@@ -93,11 +78,11 @@ jobs:
9378
labels: ubuntu-latest-4core
9479
steps:
9580
- name: Initialize environment
96-
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@8b117748ae8243f98d261a9731908867b8e3d876
81+
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@89624a6442b75b5cda33c5e9b5c8c4f87ca4f13d
9782
- name: Setup Bazel
98-
uses: angular/dev-infra/github-actions/bazel/setup@8b117748ae8243f98d261a9731908867b8e3d876
83+
uses: angular/dev-infra/github-actions/bazel/setup@89624a6442b75b5cda33c5e9b5c8c4f87ca4f13d
9984
- name: Setup Bazel RBE
100-
uses: angular/dev-infra/github-actions/bazel/configure-remote@8b117748ae8243f98d261a9731908867b8e3d876
85+
uses: angular/dev-infra/github-actions/bazel/configure-remote@89624a6442b75b5cda33c5e9b5c8c4f87ca4f13d
10186
- name: Install node modules
10287
run: yarn install --frozen-lockfile
10388
- name: Build adev in fast mode to ensure it continues to work
@@ -106,18 +91,17 @@ jobs:
10691
run: yarn bazel test //adev:test
10792

10893
publish-snapshots:
109-
if: github.event_name == 'push'
11094
runs-on:
11195
labels: ubuntu-latest
11296
steps:
11397
- name: Initialize environment
114-
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@8b117748ae8243f98d261a9731908867b8e3d876
98+
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@89624a6442b75b5cda33c5e9b5c8c4f87ca4f13d
11599
with:
116100
cache-node-modules: true
117101
- name: Setup Bazel
118-
uses: angular/dev-infra/github-actions/bazel/setup@8b117748ae8243f98d261a9731908867b8e3d876
102+
uses: angular/dev-infra/github-actions/bazel/setup@89624a6442b75b5cda33c5e9b5c8c4f87ca4f13d
119103
- name: Setup Bazel RBE
120-
uses: angular/dev-infra/github-actions/bazel/configure-remote@8b117748ae8243f98d261a9731908867b8e3d876
104+
uses: angular/dev-infra/github-actions/bazel/configure-remote@89624a6442b75b5cda33c5e9b5c8c4f87ca4f13d
121105
- name: Install node modules
122106
run: yarn install --frozen-lockfile
123107
- run: echo "https://${{secrets.SNAPSHOT_BUILDS_GITHUB_TOKEN}}:@github.com" > ${HOME}/.git_credentials
@@ -129,17 +113,17 @@ jobs:
129113
labels: ubuntu-latest-4core
130114
steps:
131115
- name: Initialize environment
132-
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@8b117748ae8243f98d261a9731908867b8e3d876
116+
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@89624a6442b75b5cda33c5e9b5c8c4f87ca4f13d
133117
with:
134118
cache-node-modules: true
135119
node-module-directories: |
136120
./node_modules
137121
./packages/zone.js/node_modules
138122
./packages/zone.js/test/typings/node_modules
139123
- name: Setup Bazel
140-
uses: angular/dev-infra/github-actions/bazel/setup@8b117748ae8243f98d261a9731908867b8e3d876
124+
uses: angular/dev-infra/github-actions/bazel/setup@89624a6442b75b5cda33c5e9b5c8c4f87ca4f13d
141125
- name: Setup Bazel RBE
142-
uses: angular/dev-infra/github-actions/bazel/configure-remote@8b117748ae8243f98d261a9731908867b8e3d876
126+
uses: angular/dev-infra/github-actions/bazel/configure-remote@89624a6442b75b5cda33c5e9b5c8c4f87ca4f13d
143127
- name: Install node modules
144128
run: yarn install --frozen-lockfile
145129
- run: |
@@ -171,26 +155,22 @@ jobs:
171155
- run: yarn --cwd packages/zone.js/test/typings test
172156

173157
bazel-saucelabs:
174-
# TODO: Replace legacy job with Bazel saucelabs job.
175-
if: github.event_name == 'push'
176158
runs-on: ubuntu-latest-4core
177159
env:
178160
JOBS: 2
179161
steps:
180162
- name: Initialize environment
181-
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@8b117748ae8243f98d261a9731908867b8e3d876
163+
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@89624a6442b75b5cda33c5e9b5c8c4f87ca4f13d
182164
with:
183165
cache-node-modules: true
184-
# Checking out the pull request commit is intended here as we need to run the changed code tests.
185-
ref: ${{ github.event.pull_request.head.sha }}
186166
- name: Install node modules
187167
run: yarn install --frozen-lockfile
188168
- name: Setup Bazel
189-
uses: angular/dev-infra/github-actions/bazel/setup@8b117748ae8243f98d261a9731908867b8e3d876
169+
uses: angular/dev-infra/github-actions/bazel/setup@89624a6442b75b5cda33c5e9b5c8c4f87ca4f13d
190170
- name: Setup Bazel Remote Caching
191-
uses: angular/dev-infra/github-actions/bazel/configure-remote@8b117748ae8243f98d261a9731908867b8e3d876
171+
uses: angular/dev-infra/github-actions/bazel/configure-remote@89624a6442b75b5cda33c5e9b5c8c4f87ca4f13d
192172
- name: Setup Saucelabs Variables
193-
uses: angular/dev-infra/github-actions/saucelabs@8b117748ae8243f98d261a9731908867b8e3d876
173+
uses: angular/dev-infra/github-actions/saucelabs@89624a6442b75b5cda33c5e9b5c8c4f87ca4f13d
194174
- name: Set up Sauce Tunnel Daemon
195175
run: yarn bazel run //tools/saucelabs-daemon/background-service -- $JOBS &
196176
env:
@@ -200,63 +180,17 @@ jobs:
200180
TESTS=$(./node_modules/.bin/bazelisk query --output label '(kind(karma_web_test, ...) intersect attr("tags", "saucelabs", ...)) except attr("tags", "fixme-saucelabs", ...)')
201181
yarn bazel test --config=saucelabs --jobs=$JOBS ${TESTS}
202182
203-
saucelabs:
204-
runs-on: ubuntu-latest-4core
205-
env:
206-
SAUCE_TUNNEL_IDENTIFIER: angular-framework-${{ github.run_number }}
207-
steps:
208-
- name: Initialize environment
209-
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@8b117748ae8243f98d261a9731908867b8e3d876
210-
with:
211-
cache-node-modules: true
212-
- name: Install node modules
213-
run: yarn install --frozen-lockfile
214-
- name: Setup Bazel
215-
uses: angular/dev-infra/github-actions/bazel/setup@8b117748ae8243f98d261a9731908867b8e3d876
216-
- name: Setup Saucelabs Variables
217-
uses: angular/dev-infra/github-actions/saucelabs@8b117748ae8243f98d261a9731908867b8e3d876
218-
- name: Starting Saucelabs tunnel service
219-
run: ./tools/saucelabs/sauce-service.sh run &
220-
# Build test fixtures for a test that rely on Bazel-generated fixtures. Note that disabling
221-
# specific tests which are reliant on such generated fixtures is not an option as SystemJS
222-
# in the Saucelabs legacy job always fetches referenced files, even if the imports would be
223-
# guarded by an check to skip in the Saucelabs legacy job. We should be good running such
224-
# test in all supported browsers on Saucelabs anyway until this job can be removed.
225-
- name: Preparing Bazel-generated fixtures required in legacy tests
226-
run: |
227-
yarn bazel build //packages/core/test:downleveled_es5_fixture //packages/common/locales
228-
# Needed for the ES5 downlevel reflector test in `packages/core/test/reflection`.
229-
mkdir -p dist/legacy-test-out/core/test/reflection/
230-
cp dist/bin/packages/core/test/reflection/es5_downleveled_inheritance_fixture.js \
231-
dist/legacy-test-out/core/test/reflection/es5_downleveled_inheritance_fixture.js
232-
# Locale files are needed for i18n tests running within Saucelabs. These are added
233-
# directly as sources so that the TypeScript compilation of `/packages/tsconfig.json`
234-
# can succeed. Note that the base locale and currencies files are checked-in, so
235-
# we do not need to re-generate those through Bazel.
236-
mkdir -p packages/common/locales/extra
237-
cp dist/bin/packages/common/locales/*.ts packages/common/locales
238-
cp dist/bin/packages/common/locales/extra/*.ts packages/common/locales/extra
239-
- name: Build bundle of tests to run on Saucelabs
240-
run: node tools/legacy-saucelabs/build-saucelabs-test-bundle.mjs
241-
- name: Wait and confirm Saucelabs tunnel has connected
242-
run: ./tools/saucelabs/sauce-service.sh ready-wait
243-
timeout-minutes: 3
244-
- name: Running tests on Saucelabs.
245-
run: KARMA_WEB_TEST_MODE=SL_REQUIRED yarn karma start ./karma-js.conf.js --single-run
246-
- name: Stop Saucelabs tunnel service
247-
run: ./tools/saucelabs/sauce-service.sh stop
248-
249183
adev-deploy:
250184
needs: [adev]
251-
if: needs.adev.result == 'success' && github.event_name == 'push'
185+
if: needs.adev.result == 'success'
252186
runs-on: ubuntu-latest
253187
steps:
254188
- name: Initialize environment
255-
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@8b117748ae8243f98d261a9731908867b8e3d876
189+
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@89624a6442b75b5cda33c5e9b5c8c4f87ca4f13d
256190
- name: Setup Bazel
257-
uses: angular/dev-infra/github-actions/bazel/setup@8b117748ae8243f98d261a9731908867b8e3d876
191+
uses: angular/dev-infra/github-actions/bazel/setup@89624a6442b75b5cda33c5e9b5c8c4f87ca4f13d
258192
- name: Setup Bazel RBE
259-
uses: angular/dev-infra/github-actions/bazel/configure-remote@8b117748ae8243f98d261a9731908867b8e3d876
193+
uses: angular/dev-infra/github-actions/bazel/configure-remote@89624a6442b75b5cda33c5e9b5c8c4f87ca4f13d
260194
- name: Install node modules
261195
run: yarn install --frozen-lockfile
262196
- name: Build adev to ensure it continues to work

.github/workflows/dev-infra.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
16-
- uses: angular/dev-infra/github-actions/commit-message-based-labels@8b117748ae8243f98d261a9731908867b8e3d876
16+
- uses: angular/dev-infra/github-actions/commit-message-based-labels@89624a6442b75b5cda33c5e9b5c8c4f87ca4f13d
1717
with:
1818
angular-robot-key: ${{ secrets.ANGULAR_ROBOT_PRIVATE_KEY }}
1919
post_approval_changes:
2020
runs-on: ubuntu-latest
2121
steps:
2222
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
23-
- uses: angular/dev-infra/github-actions/post-approval-changes@8b117748ae8243f98d261a9731908867b8e3d876
23+
- uses: angular/dev-infra/github-actions/post-approval-changes@89624a6442b75b5cda33c5e9b5c8c4f87ca4f13d
2424
with:
2525
angular-robot-key: ${{ secrets.ANGULAR_ROBOT_PRIVATE_KEY }}

.github/workflows/google-internal-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
runs-on: ubuntu-latest
1515
steps:
1616
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
17-
- uses: angular/dev-infra/github-actions/google-internal-tests@8b117748ae8243f98d261a9731908867b8e3d876
17+
- uses: angular/dev-infra/github-actions/google-internal-tests@89624a6442b75b5cda33c5e9b5c8c4f87ca4f13d
1818
with:
1919
run-tests-guide-url: http://go/angular-g3sync-start
2020
github-token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/merge-ready-status.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ jobs:
99
status:
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: angular/dev-infra/github-actions/unified-status-check@8b117748ae8243f98d261a9731908867b8e3d876
12+
- uses: angular/dev-infra/github-actions/unified-status-check@89624a6442b75b5cda33c5e9b5c8c4f87ca4f13d
1313
with:
1414
angular-robot-key: ${{ secrets.ANGULAR_ROBOT_PRIVATE_KEY }}

.github/workflows/monitoring.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@ jobs:
2222
version: ['https://next.angular.io/', 'https://angular.io/']
2323
steps:
2424
- name: Initialize environment
25-
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@8b117748ae8243f98d261a9731908867b8e3d876
25+
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@89624a6442b75b5cda33c5e9b5c8c4f87ca4f13d
2626
with:
2727
cache-node-modules: true
2828
node-module-directories: |
2929
./aio/node_modules
3030
- name: Setup Bazel
31-
uses: angular/dev-infra/github-actions/bazel/setup@8b117748ae8243f98d261a9731908867b8e3d876
31+
uses: angular/dev-infra/github-actions/bazel/setup@89624a6442b75b5cda33c5e9b5c8c4f87ca4f13d
3232
- name: Setup Bazel RBE
33-
uses: angular/dev-infra/github-actions/bazel/configure-remote@8b117748ae8243f98d261a9731908867b8e3d876
33+
uses: angular/dev-infra/github-actions/bazel/configure-remote@89624a6442b75b5cda33c5e9b5c8c4f87ca4f13d
3434
- name: Install node modules in aio
3535
run: yarn install --frozen-lockfile --cwd aio
3636
- name: Run basic e2e and deployment config tests.
@@ -44,7 +44,7 @@ jobs:
4444
runs-on: ubuntu-latest
4545
steps:
4646
- name: Initialize environment
47-
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@8b117748ae8243f98d261a9731908867b8e3d876
47+
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@89624a6442b75b5cda33c5e9b5c8c4f87ca4f13d
4848
with:
4949
cache-node-modules: true
5050
node-module-directories: |

0 commit comments

Comments
 (0)