Skip to content

Commit d320853

Browse files
committed
ci: run tests in parallel to speedup the ci
1 parent 11a0394 commit d320853

File tree

1 file changed

+24
-5
lines changed

1 file changed

+24
-5
lines changed

.github/workflows/ci.yml

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
with:
2222
extra_args: --all-files
2323

24-
test-codspeed:
24+
os-test-codspeed:
2525
strategy:
2626
matrix:
2727
os: [ubuntu-latest, windows-latest, macos-latest]
@@ -68,16 +68,34 @@ jobs:
6868
- name: Check divan_compat MSRV
6969
run: cargo msrv --path crates/divan_compat verify -- cargo check --all-features --config codspeed=true
7070

71-
tests:
71+
tests-without-cargo-codspeed:
7272
runs-on: ubuntu-latest
7373
steps:
7474
- uses: actions/checkout@v4
7575
with:
7676
submodules: true
7777
- uses: moonrepo/setup-rust@v1
78+
with:
79+
bins: cargo-nextest
80+
env:
81+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
82+
- run: cargo nextest run -exclude cargo-codspeed
83+
84+
test-cargo-codspeed:
85+
runs-on: ubuntu-latest
86+
strategy:
87+
matrix:
88+
partition: [1, 2, 3, 4, 5]
89+
steps:
90+
- uses: actions/checkout@v4
91+
with:
92+
submodules: true
93+
- uses: moonrepo/setup-rust@v1
94+
with:
95+
bins: cargo-nextest
7896
env:
7997
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
80-
- run: cargo test --all
98+
- run: cargo nextest run -p cargo-codspeed --partition count:${{ matrix.partition }}/5
8199

82100
compat-integration-test-instrumentation:
83101
runs-on: ubuntu-latest
@@ -176,9 +194,10 @@ jobs:
176194
if: always()
177195
needs:
178196
- lint
179-
- test-codspeed
197+
- os-test-codspeed
198+
- tests-without-cargo-codspeed
199+
- test-cargo-codspeed
180200
- msrv-check
181-
- tests
182201
- compat-integration-test-instrumentation
183202
- compat-integration-test-walltime
184203
- musl-build-check

0 commit comments

Comments
 (0)