Repository navigation
188 lines (152 loc) · 4.74 KB
/
Copy pathci.yml
File metadata and controls
188 lines (152 loc) · 4.74 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
name: CI Pipeline
permissions:
contents: read
on:
workflow_call:
workflow_dispatch:
schedule:
- cron: "17 5 * * *"
push:
branches:
- master
pull_request:
branches:
- master
jobs:
quality:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: "24"
cache: npm
cache-dependency-path: |
package-lock.json
docs/package-lock.json
- name: Install project npm version
run: npm install --global npm@11.18.0
- name: Install dependencies
run: |
npm ci
npm --prefix docs ci
- name: Install Hugo
env:
HUGO_VERSION: 0.146.0
run: |
wget -O "$RUNNER_TEMP/hugo.deb" "https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb"
sudo dpkg -i "$RUNNER_TEMP/hugo.deb"
- name: Build validation artifacts
run: npm run release:build
- name: Run repository checks
run: npm run check
package:
needs: quality
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: "24"
cache: npm
- name: Install project npm version
run: npm install --global npm@11.18.0
- name: Install dependencies
run: npm ci
- name: Build release artifacts
run: npm run release:build
- name: Require reproducible generated files
run: git diff --exit-code
- name: Audit production dependencies
run: npm audit --omit=dev --audit-level=high
- name: Verify package contents
run: |
mkdir -p release
npm pack --ignore-scripts --pack-destination release --json > release/npm-pack.json
node scripts/release.mjs verify-pack release/npm-pack.json
tarball="$(node -p 'require("./release/npm-pack.json")[0].filename')"
npm run check:package-consumer -- "release/$tarball"
browser:
needs: package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: "24"
cache: npm
- name: Install project npm version
run: npm install --global npm@11.18.0
- name: Install dependencies
run: npm ci
- name: Install the current AngularTS release
run: npm install --no-save --package-lock=false @angular-wave/angular.ts@latest
- name: Report the AngularTS compatibility target
run: npm run check:angular-ts-version -- --registry-latest
- name: Install supported browsers
run: npx playwright install --with-deps chromium firefox webkit
- name: Run browser tests
run: npm test
- uses: actions/upload-artifact@v6
if: always()
with:
name: playwright-report
path: playwright-report/
if-no-files-found: ignore
retention-days: 3
documentation:
needs: package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
submodules: recursive
- uses: actions/setup-node@v6
with:
node-version: "24"
cache: npm
cache-dependency-path: |
package-lock.json
docs/package-lock.json
- name: Install project npm version
run: npm install --global npm@11.18.0
- name: Install dependencies
run: |
npm ci
npm --prefix docs ci
- name: Install Chromium
run: npx playwright install --with-deps chromium
- name: Install Hugo
env:
HUGO_VERSION: 0.146.0
run: |
wget -O "$RUNNER_TEMP/hugo.deb" "https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb"
sudo dpkg -i "$RUNNER_TEMP/hugo.deb"
- name: Run documentation tests
run: npm run test:docs
- uses: actions/upload-artifact@v6
if: always()
with:
name: documentation-playwright-report
path: playwright-report/
if-no-files-found: ignore
retention-days: 3
ci-gate:
name: CI Gate
if: always()
needs:
- quality
- package
- browser
- documentation
runs-on: ubuntu-latest
steps:
- name: Require every CI job to pass
if: >-
needs.quality.result != 'success' ||
needs.package.result != 'success' ||
needs.browser.result != 'success' ||
needs.documentation.result != 'success'
run: exit 1
- name: Confirm CI completion
run: echo "Every required CI job passed."