@@ -126,6 +126,11 @@ jobs:
126
126
export DOCKER_GOCACHE="$HOME/.go-archlinux"
127
127
./assets/docker/test.sh archlinux
128
128
test-macos :
129
+ name : test-macos-${{ matrix.test-index }}
130
+ strategy :
131
+ fail-fast : false
132
+ matrix :
133
+ test-index : [0, 1, 2]
129
134
needs : changes
130
135
if : github.event_name == 'push' || needs.changes.outputs.code == 'true'
131
136
runs-on : macos-15
@@ -159,7 +164,14 @@ jobs:
159
164
env :
160
165
CHEZMOI_GITHUB_TOKEN : ${{ secrets.CHEZMOI_GITHUB_TOKEN }}
161
166
run : |
162
- go test -race ./...
167
+ if [ "${{ matrix.test-index }}" = "0" ]; then
168
+ go test ./... -short -race
169
+ go test ./internal/cmd -run=TestScript -filter='^[0-9a-dA-D]' -race
170
+ elif [ "${{ matrix.test-index }}" = "1" ]; then
171
+ go test ./internal/cmd -run=TestScript -filter='^[e-iE-I]' -race
172
+ else
173
+ go test ./internal/cmd -run=TestScript -filter='^[j-zJ-Z]' -race
174
+ fi
163
175
test-oldstable-go :
164
176
needs : changes
165
177
if : github.event_name == 'push' || needs.changes.outputs.code == 'true'
@@ -257,13 +269,14 @@ jobs:
257
269
name : chezmoi-windows-amd64
258
270
path : dist/chezmoi-nocgo_windows_amd64_v1/chezmoi.exe
259
271
test-ubuntu :
260
- name : test-ubuntu-umask${{ matrix.umask }}
272
+ name : test-ubuntu-umask${{ matrix.umask }}-${{ matrix.test-index }}
261
273
strategy :
262
274
fail-fast : false
263
275
matrix :
264
276
umask :
265
277
- " 022"
266
278
- " 002"
279
+ test-index : [0, 1]
267
280
needs : changes
268
281
runs-on : ubuntu-22.04
269
282
permissions :
@@ -298,8 +311,14 @@ jobs:
298
311
if : github.event_name == 'push' || needs.changes.outputs.code == 'true'
299
312
env :
300
313
CHEZMOI_GITHUB_TOKEN : ${{ secrets.CHEZMOI_GITHUB_TOKEN }}
301
- run : |
302
- go test -ldflags="-X github.com/twpayne/chezmoi/v2/internal/chezmoitest.umaskStr=0o${{ matrix.umask }}" -race -timeout=1h ./...
314
+ TEST_FLAGS : ' -ldflags="-X github.com/twpayne/chezmoi/v2/internal/chezmoitest.umaskStr=0o${{ matrix.umask }}" -race -timeout=1h'
315
+ run : |
316
+ if [ "${{ matrix.test-index }}" = "0" ]; then
317
+ go test ./... -short ${{ env.TEST_FLAGS }}
318
+ go test ./internal/cmd -run=TestScript -filter='^[0-9a-hA-h]' ${{ env.TEST_FLAGS }}
319
+ else
320
+ go test ./internal/cmd -run=TestScript -filter='^[i-zI-Z]' ${{ env.TEST_FLAGS }}
321
+ fi
303
322
test-website :
304
323
runs-on : ubuntu-22.04
305
324
permissions :
@@ -323,6 +342,11 @@ jobs:
323
342
env :
324
343
CHEZMOI_GITHUB_TOKEN : ${{ secrets.CHEZMOI_GITHUB_TOKEN }}
325
344
test-windows :
345
+ name : test-windows-${{ matrix.test-index }}
346
+ strategy :
347
+ fail-fast : false
348
+ matrix :
349
+ test-index : [0, 1]
326
350
needs : changes
327
351
if : github.event_name == 'push' || needs.changes.outputs.code == 'true'
328
352
runs-on : windows-2022
@@ -343,7 +367,12 @@ jobs:
343
367
env :
344
368
CHEZMOI_GITHUB_TOKEN : ${{ secrets.CHEZMOI_GITHUB_TOKEN }}
345
369
run : |
346
- go test -race ./...
370
+ if (${{ matrix.test-index }} -eq 0) {
371
+ go test ./... -short -race
372
+ go test ./internal/cmd -run=TestScript -filter='^[0-9a-hA-h]' -race
373
+ } else {
374
+ go test ./internal/cmd -run=TestScript -filter='^[i-zI-Z]' -race
375
+ }
347
376
check :
348
377
runs-on : ubuntu-22.04
349
378
permissions :
0 commit comments