-
Notifications
You must be signed in to change notification settings - Fork 1
201 lines (153 loc) · 6.02 KB
/
ci.yml
File metadata and controls
201 lines (153 loc) · 6.02 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
name: Continuous Integration
# Triggers the following workflows:
# - .github/workflows/codecov.yml
on: pull_request
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
pull-requests: read
jobs:
block-autosquash-commits:
runs-on: ubuntu-latest
steps:
- name: Block Autosquash Commits
uses: xt0rted/block-autosquash-commits-action@79880c36b4811fe549cfffe20233df88876024e7 # v2.2.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
install:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Install pnpm package manager
uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v4.4.0
- name: Set up Node.js version and cache
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
cache: "pnpm"
node-version-file: .nvmrc
- name: Check for known security issues with npm packages
run: |
echo "Auditing npm dependencies before installing them. For more information, see: https://nldesignsystem.nl/pnpm-audit"
pnpm audit --audit-level critical
- name: Install dependencies
run: pnpm install --frozen-lockfile
lint:
runs-on: ubuntu-latest
needs: install
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Install pnpm package manager
uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v4.4.0
- name: Set up Node.js version and cache
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
cache: "pnpm"
node-version-file: .nvmrc
- name: Check for known security issues with npm packages
run: |
echo "Auditing npm dependencies before installing them. For more information, see: https://nldesignsystem.nl/pnpm-audit"
pnpm audit --audit-level critical
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Lint
run: pnpm run lint
build:
runs-on: ubuntu-latest
needs: install
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Install pnpm package manager
uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v4.4.0
- name: Set up Node.js version and cache
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
cache: "pnpm"
node-version-file: .nvmrc
- name: Check for known security issues with npm packages
run: |
echo "Auditing npm dependencies before installing them. For more information, see: https://nldesignsystem.nl/pnpm-audit"
pnpm audit --audit-level critical
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build
run: pnpm run --if-present build
- name: "Continuous Integration: lint build"
run: pnpm run --if-present lint-build
- name: Cleanup
run: pnpm run clean
- name: Test cleanup
run: test -z "$(git status --porcelain=v2)"
test:
runs-on: ubuntu-latest
needs: install
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Install pnpm package manager
uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v4.4.0
- name: Set up Node.js version and cache
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
cache: "pnpm"
node-version-file: .nvmrc
- name: Check for known security issues with npm packages
run: |
echo "Auditing npm dependencies before installing them. For more information, see: https://nldesignsystem.nl/pnpm-audit"
pnpm audit --audit-level critical
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Install headless browsers for testing components in-browser
run: pnpm run test-install-browsers
- name: Test
run: |
pnpm run test-coverage
pnpm run build
pnpm run test-build
- name: Upload coverage-report artifact
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: coverage-report
path: "**/coverage/"
retention-days: 1
test-e2e:
runs-on: ubuntu-latest
needs: install
env:
E2E_RETRIES: 1
E2E_TIMEOUT_GLOBAL: 600000
E2E_TIMEOUT_TEST: 60000
E2E_TIMEOUT_EXPECT: 10000
E2E_TARGET_URL: "http://localhost:9492"
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Install pnpm package manager
uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v4.4.0
- name: Set up Node.js version and cache
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version-file: .nvmrc
- name: Check for known security issues with npm packages
run: |
echo "Auditing npm dependencies before installing them. For more information, see: https://nldesignsystem.nl/pnpm-audit"
pnpm audit --audit-level critical
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build
run: pnpm run build
- name: Install headless browsers for end-to-end testing
run: pnpm run test-install-browsers
- name: End-to-end tests
run: pnpm run test-e2e
- name: Store Playwright artifacts
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
if: failure()
with:
name: playwright-results
path: packages/*/tmp/playwright-results
retention-days: 1