Skip to content

Commit 219493a

Browse files
committed
ci: run tests in parallel to speedup the ci
1 parent d410af1 commit 219493a

File tree

1 file changed

+23
-4
lines changed

1 file changed

+23
-4
lines changed

.github/workflows/ci.yml

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,16 +89,34 @@ jobs:
8989
- name: Check divan_compat MSRV
9090
run: cargo msrv --path crates/divan_compat verify -- cargo check --all-features --config codspeed=true
9191

92-
tests:
92+
tests-without-cargo-codspeed:
9393
runs-on: ubuntu-latest
9494
steps:
9595
- uses: actions/checkout@v4
9696
with:
9797
submodules: true
9898
- uses: moonrepo/setup-rust@v1
99+
with:
100+
bins: cargo-nextest
101+
env:
102+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
103+
- run: cargo nextest run --workspace --exclude cargo-codspeed
104+
105+
test-cargo-codspeed:
106+
runs-on: ubuntu-latest
107+
strategy:
108+
matrix:
109+
partition: [1, 2, 3, 4, 5]
110+
steps:
111+
- uses: actions/checkout@v4
112+
with:
113+
submodules: true
114+
- uses: moonrepo/setup-rust@v1
115+
with:
116+
bins: cargo-nextest
99117
env:
100118
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
101-
- run: cargo test --all
119+
- run: cargo nextest run -p cargo-codspeed --partition hash:${{ matrix.partition }}/5
102120

103121
compat-integration-test-instrumentation:
104122
runs-on: ubuntu-latest
@@ -197,9 +215,10 @@ jobs:
197215
if: always()
198216
needs:
199217
- lint
200-
- test-codspeed
218+
- os-test-codspeed
219+
- tests-without-cargo-codspeed
220+
- test-cargo-codspeed
201221
- msrv-check
202-
- tests
203222
- compat-integration-test-instrumentation
204223
- compat-integration-test-walltime
205224
- musl-build-check

0 commit comments

Comments
 (0)