-
Notifications
You must be signed in to change notification settings - Fork 13
211 lines (178 loc) · 5.05 KB
/
ci.yml
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
name: CI
on:
push:
branches:
- main
pull_request:
env:
NODE_VERSION: 18
PERCY_PARALLEL_NONCE: ${{ github.run_id }}-${{ github.run_number }}
PERCY_PARALLEL_TOTAL: 9
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
strategy:
matrix:
package-location:
- 'docs-app'
- 'packages/ember-container-query'
- 'test-app'
timeout-minutes: 5
steps:
- name: Check out a copy of the repo
uses: actions/checkout@v4
- name: Set up pnpm
uses: pnpm/action-setup@v4
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v4
with:
cache: 'pnpm'
node-version: ${{ env.NODE_VERSION }}
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Lint
run: pnpm lint
working-directory: ${{ matrix.package-location }}
build-docs-app:
name: Build (docs-app)
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Check out a copy of the repo
uses: actions/checkout@v4
- name: Set up pnpm
uses: pnpm/action-setup@v4
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v4
with:
cache: 'pnpm'
node-version: ${{ env.NODE_VERSION }}
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build docs-app
run: pnpm build:test
working-directory: 'docs-app'
- name: Upload docs-app
uses: actions/upload-artifact@v4
with:
name: dist
path: docs-app/dist
test-docs-app:
name: Test (docs-app)
needs: [build-docs-app]
runs-on: ubuntu-latest
strategy:
matrix:
device:
- 'w1-h1'
- 'w2-h1'
- 'w3-h1'
- 'w1-h2'
- 'w2-h2'
- 'w3-h2'
- 'w1-h3'
- 'w2-h3'
- 'w3-h3'
include:
- device: 'w1-h1'
test-port: 7357
- device: 'w2-h1'
test-port: 7358
- device: 'w3-h1'
test-port: 7359
- device: 'w1-h2'
test-port: 7360
- device: 'w2-h2'
test-port: 7361
- device: 'w3-h2'
test-port: 7362
- device: 'w1-h3'
test-port: 7363
- device: 'w2-h3'
test-port: 7364
- device: 'w3-h3'
test-port: 7365
timeout-minutes: 5
steps:
- name: Check out a copy of the repo
uses: actions/checkout@v4
- name: Set up pnpm
uses: pnpm/action-setup@v4
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v4
with:
cache: 'pnpm'
node-version: ${{ env.NODE_VERSION }}
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Download docs-app
uses: actions/download-artifact@v4
with:
name: dist
path: docs-app/dist
- name: Test (w/ visual regression)
run: npx percy exec -- pnpm test:device --path=dist --test-port=${{ matrix.test-port }}
working-directory: 'docs-app'
env:
DEVICE: ${{ matrix.device }}
PERCY_PARALLEL_NONCE: ${{ env.PERCY_PARALLEL_NONCE }}
PERCY_PARALLEL_TOTAL: ${{ env.PERCY_PARALLEL_TOTAL }}
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }}
test:
name: Test
runs-on: ubuntu-latest
strategy:
matrix:
package-location:
- 'packages/ember-container-query'
- 'test-app'
timeout-minutes: 5
steps:
- name: Check out a copy of the repo
uses: actions/checkout@v4
- name: Set up pnpm
uses: pnpm/action-setup@v4
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v4
with:
cache: 'pnpm'
node-version: ${{ env.NODE_VERSION }}
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Test
run: pnpm test
working-directory: ${{ matrix.package-location }}
test-compatibility:
name: Test compatibility
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
scenario:
- 'ember-lts-4.4'
- 'ember-lts-4.8'
- 'ember-lts-4.12'
- 'ember-lts-5.4'
- 'ember-lts-5.8'
- 'ember-release'
- 'ember-beta'
- 'ember-canary'
- 'embroider-safe'
- 'embroider-optimized'
timeout-minutes: 5
steps:
- name: Check out a copy of the repo
uses: actions/checkout@v4
- name: Set up pnpm
uses: pnpm/action-setup@v4
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v4
with:
cache: 'pnpm'
node-version: ${{ env.NODE_VERSION }}
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Test
run: pnpm test:ember-compatibility ${{ matrix.scenario }} --- pnpm test
working-directory: 'test-app'