Skip to content

Commit cb945dd

Browse files
committed
shard inside the step
1 parent ea76833 commit cb945dd

File tree

1 file changed

+18
-35
lines changed

1 file changed

+18
-35
lines changed

.github/workflows/integration-tests.yml

Lines changed: 18 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -27,43 +27,17 @@ jobs:
2727

2828
integration:
2929
- name: upgrade
30-
shard: 1/3
31-
- name: upgrade
32-
shard: 2/3
33-
- name: upgrade
34-
shard: 3/3
35-
- name: vite
36-
shard: 1/5
37-
- name: vite
38-
shard: 2/5
30+
shards: 3
3931
- name: vite
40-
shard: 3/5
41-
- name: vite
42-
shard: 4/5
43-
- name: vite
44-
shard: 5/5
45-
- name: cli
46-
shard: 1/4
47-
- name: cli
48-
shard: 2/4
32+
shards: 5
4933
- name: cli
50-
shard: 3/4
51-
- name: cli
52-
shard: 4/4
53-
- name: postcss
54-
shard: 1/5
55-
- name: postcss
56-
shard: 2/5
57-
- name: postcss
58-
shard: 3/5
34+
shards: 4
5935
- name: postcss
60-
shard: 4/5
61-
- name: postcss
62-
shard: 5/5
36+
shards: 5
6337
- name: oxide
64-
shard: 1/1
38+
shards: 1
6539
- name: webpack
66-
shard: 1/1
40+
shards: 1
6741

6842
# Exclude windows and macos from being built on feature branches
6943
run-all:
@@ -79,7 +53,7 @@ jobs:
7953
runs-on: ${{ matrix.runner.os }}
8054
timeout-minutes: 30
8155

82-
name: ${{ matrix.runner.name }} / ${{ matrix.integration.name }} / ${{ matrix.integration.shard }}
56+
name: ${{ matrix.runner.name }} / ${{ matrix.integration.name }}
8357

8458
steps:
8559
- uses: actions/checkout@v4
@@ -135,8 +109,17 @@ jobs:
135109
CARGO_PROFILE_RELEASE_LTO: 'off'
136110
CARGO_TARGET_X86_64_PC_WINDOWS_MSVC_LINKER: 'lld-link'
137111

138-
- name: Test ${{ matrix.integration.name }} ${{ matrix.integration.shard }}
139-
run: pnpm run test:integrations ./integrations/${{ matrix.integration.name }} --shard ${{ matrix.integration.shard }}
112+
- name: Test ${{ matrix.integration.name }}
113+
run: |
114+
115+
# Run shards in parallel
116+
for i in $(seq 1 ${{ matrix.integration.shards }}); do
117+
(pnpm run test:integrations ./integrations/${{ matrix.integration.name }} --shard $i/${{ matrix.integration.shards }}) &
118+
done
119+
120+
# Wait for all background jobs
121+
wait
122+
140123
env:
141124
GITHUB_WORKSPACE: ${{ github.workspace }}
142125

0 commit comments

Comments
 (0)