forked from angular/angular
-
Notifications
You must be signed in to change notification settings - Fork 0
238 lines (220 loc) Β· 9.79 KB
/
ci.yml
File metadata and controls
238 lines (220 loc) Β· 9.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
name: CI (push)
on:
push:
branches:
- main
- '[0-9]+.[0-9]+.x'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions: {}
defaults:
run:
shell: bash
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Initialize environment
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@e12608620a98aa269f910e4d139e7c7b87f5c0c6
- name: Install node modules
run: pnpm install --frozen-lockfile
- name: Check code lint
run: pnpm tslint
- name: Check for circular dependencies
run: pnpm ts-circular-deps:check
- name: Validate pull approve configuration
run: pnpm ng-dev pullapprove verify
- name: Validate angular robot configuration
run: pnpm ng-dev ngbot verify
- name: Confirm code builds with typescript as expected
run: pnpm check-tooling-setup
devtools:
runs-on: ubuntu-latest
steps:
- name: Initialize environment
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@e12608620a98aa269f910e4d139e7c7b87f5c0c6
with:
disable-package-manager-cache: true
- name: Setup Bazel
uses: angular/dev-infra/github-actions/bazel/setup@e12608620a98aa269f910e4d139e7c7b87f5c0c6
- name: Setup Bazel RBE
uses: angular/dev-infra/github-actions/bazel/configure-remote@e12608620a98aa269f910e4d139e7c7b87f5c0c6
with:
google_credential: ${{ secrets.RBE_TRUSTED_BUILDS_USER }}
- name: Cache downloaded Cypress binary
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: '~/.cache/Cypress'
key: cypress-cache-${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
- name: Install node modules
run: pnpm install --frozen-lockfile
- name: Run unit tests
run: pnpm devtools:test
- name: Test build
run: pnpm devtools:build:chrome
- name: Cypress run
uses: cypress-io/github-action@e65cba2e7319696fc0fdc4d5a319b737aec4ba1c # v6.10.3
with:
command: pnpm devtools:test:e2e
start: pnpm bazel run //devtools/src:devserver
wait-on: 'http://localhost:4200'
wait-on-timeout: 300
install: false
test:
runs-on: ubuntu-latest
steps:
- name: Initialize environment
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@e12608620a98aa269f910e4d139e7c7b87f5c0c6
- name: Setup Bazel
uses: angular/dev-infra/github-actions/bazel/setup@e12608620a98aa269f910e4d139e7c7b87f5c0c6
- name: Setup Bazel Remote Caching
uses: angular/dev-infra/github-actions/bazel/configure-remote@e12608620a98aa269f910e4d139e7c7b87f5c0c6
with:
google_credential: ${{ secrets.RBE_TRUSTED_BUILDS_USER }}
- name: Install node modules
run: pnpm install --frozen-lockfile
- name: Run CI tests for framework
run: pnpm test:ci
integration-tests:
runs-on: ubuntu-latest
steps:
- name: Initialize environment
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@e12608620a98aa269f910e4d139e7c7b87f5c0c6
- name: Setup Bazel
uses: angular/dev-infra/github-actions/bazel/setup@e12608620a98aa269f910e4d139e7c7b87f5c0c6
- name: Setup Bazel Remote Caching
uses: angular/dev-infra/github-actions/bazel/configure-remote@e12608620a98aa269f910e4d139e7c7b87f5c0c6
with:
google_credential: ${{ secrets.RBE_TRUSTED_BUILDS_USER }}
- name: Install node modules
run: pnpm install --frozen-lockfile
- name: Run integration CI tests for framework
run: pnpm integration-tests:ci
adev:
runs-on:
labels: ubuntu-latest
steps:
- name: Initialize environment
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@e12608620a98aa269f910e4d139e7c7b87f5c0c6
- name: Setup Bazel
uses: angular/dev-infra/github-actions/bazel/setup@e12608620a98aa269f910e4d139e7c7b87f5c0c6
- name: Setup Bazel RBE
uses: angular/dev-infra/github-actions/bazel/configure-remote@e12608620a98aa269f910e4d139e7c7b87f5c0c6
with:
google_credential: ${{ secrets.RBE_TRUSTED_BUILDS_USER }}
- name: Install node modules
run: pnpm install --frozen-lockfile
- name: Run tests
run: pnpm bazel test //adev/...
- name: Build adev in fast mode to ensure it continues to work
run: pnpm bazel build //adev:build
vscode-ng-language-service:
runs-on:
labels: ubuntu-latest
steps:
- name: Initialize environment
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@e12608620a98aa269f910e4d139e7c7b87f5c0c6
- name: Setup Bazel
uses: angular/dev-infra/github-actions/bazel/setup@e12608620a98aa269f910e4d139e7c7b87f5c0c6
- name: Setup Bazel RBE
uses: angular/dev-infra/github-actions/bazel/configure-remote@e12608620a98aa269f910e4d139e7c7b87f5c0c6
with:
google_credential: ${{ secrets.RBE_TRUSTED_BUILDS_USER }}
- name: Install node modules
run: pnpm install --frozen-lockfile
- name: Cache downloaded vscode binary
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: '~/.cache/vscode-test'
key: vscode-cache-${{ runner.os }}-${{ hashFiles('vscode-ng-language-service/integration/e2e/index.ts') }} # The version is specified in this file.
- name: Run tests
run: pnpm bazel test //vscode-ng-language-service/...
publish-snapshots:
runs-on:
labels: ubuntu-latest
steps:
- name: Initialize environment
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@e12608620a98aa269f910e4d139e7c7b87f5c0c6
- name: Setup Bazel
uses: angular/dev-infra/github-actions/bazel/setup@e12608620a98aa269f910e4d139e7c7b87f5c0c6
- name: Setup Bazel RBE
uses: angular/dev-infra/github-actions/bazel/configure-remote@e12608620a98aa269f910e4d139e7c7b87f5c0c6
- name: Install node modules
run: pnpm install --frozen-lockfile
- run: echo "https://${{secrets.SNAPSHOT_BUILDS_GITHUB_TOKEN}}:@github.com" > ${HOME}/.git_credentials
- run: pnpm build
- run: ./scripts/ci/publish-snapshot-build-artifacts.sh
zone-js:
runs-on:
labels: ubuntu-latest
steps:
- name: Initialize environment
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@e12608620a98aa269f910e4d139e7c7b87f5c0c6
- name: Setup Bazel
uses: angular/dev-infra/github-actions/bazel/setup@e12608620a98aa269f910e4d139e7c7b87f5c0c6
- name: Setup Bazel RBE
uses: angular/dev-infra/github-actions/bazel/configure-remote@e12608620a98aa269f910e4d139e7c7b87f5c0c6
with:
google_credential: ${{ secrets.RBE_TRUSTED_BUILDS_USER }}
- name: Install node modules
run: pnpm install --frozen-lockfile
- run: |
pnpm bazel build \
//packages/zone.js/bundles:zone.umd.js \
//packages/zone.js:npm_package \
//packages/zone.js/test/closure:closure
- run: |
rm -Rf packages/zone.js/build
rm -Rf packages/zone.js/test/extra/*.umd.js
mkdir -p packages/zone.js/build/
mkdir -p packages/zone.js/build/test/
cp dist/bin/packages/zone.js/bundles/zone.umd.js packages/zone.js/build/zone.umd.js
cp dist/bin/packages/zone.js/npm_package/bundles/zone-mix.umd.js ./packages/zone.js/test/extra/
cp dist/bin/packages/zone.js/npm_package/bundles/zone-patch-electron.umd.js ./packages/zone.js/test/extra/
cp dist/bin/packages/zone.js/test/closure/zone.closure.js ./packages/zone.js/build/test/zone.closure.mjs
# Install
- run: pnpm -C packages/zone.js install --frozen-lockfile
# Run zone.js tools tests
- run: pnpm -C packages/zone.js promisefinallytest
- run: pnpm -C packages/zone.js jest:test
- run: pnpm -C packages/zone.js jest:nodetest
- run: pnpm -C packages/zone.js vitest:test
- run: pnpm -C packages/zone.js electrontest
- run: pnpm -C packages/zone.js/test/typings test
# saucelabs:
# runs-on: ubuntu-latest
# env:
# SAUCE_TUNNEL_IDENTIFIER: angular-framework-${{ github.run_number }}
# steps:
# - name: Initialize environment
# uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@b5a3609f89c06eb4037dce22a93641213a5d1508
# - name: Install node modules
# run: pnpm install --frozen-lockfile
# - uses: ./.github/actions/saucelabs-legacy
adev-deploy:
needs: [adev]
if: needs.adev.result == 'success'
runs-on: ubuntu-latest-8core
steps:
- name: Initialize environment
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@e12608620a98aa269f910e4d139e7c7b87f5c0c6
- name: Setup Bazel
uses: angular/dev-infra/github-actions/bazel/setup@e12608620a98aa269f910e4d139e7c7b87f5c0c6
- name: Setup Bazel RBE
uses: angular/dev-infra/github-actions/bazel/configure-remote@e12608620a98aa269f910e4d139e7c7b87f5c0c6
- name: Install node modules
run: pnpm install --frozen-lockfile
- name: Build adev
run: pnpm bazel build //adev:build.production --config=release
- name: Deploy to firebase
uses: ./.github/actions/deploy-docs-site
with:
serviceKey: ${{ secrets.ANGULAR_DEV_SITE_DEPLOY }}
githubReleaseTrainReadToken: ${{ secrets.DOCS_DEPLOY_GITHUB_RELEASE_TRAIN_TOKEN }}
configPath: 'adev/firebase.json'
distDir: 'dist/bin/adev/dist/browser'
- name: Update Algolia synonym record
run: pnpm tsx adev/scripts/synonyms/update-synonyms.mts
env:
ALGOLIA_KEY: ${{ secrets.ALGOLIA_SYNONYM_MANAGER }}