Skip to content

Commit 15dfe2a

Browse files
ci: distribute feature-set test execution (#818)
Use cargo-hacks `--partition` option to distribute feature-set test execution to a set of runners with the goal to speed up feedback cycles. According to https://github.com/testcontainers/testcontainers-rs/actions/workflows/.github/workflows/ci.yml this reduces this workflows duration from ~25 minutes to ~9 minutes.
1 parent ac06c5e commit 15dfe2a

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
pull_request:
55
merge_group:
66
push:
7-
branches: [ main ]
7+
branches: [main]
88

99
concurrency:
1010
group: ${{ github.ref }}
@@ -43,6 +43,11 @@ jobs:
4343
toolchain:
4444
- stable
4545
- nightly
46+
partition:
47+
- 1/4
48+
- 2/4
49+
- 3/4
50+
- 4/4
4651
steps:
4752
- name: Checkout sources
4853
uses: actions/checkout@v4
@@ -62,7 +67,7 @@ jobs:
6267
with:
6368
tool: cargo-hack
6469
- name: Tests
65-
run: cargo hack test --feature-powerset --depth 2 --clean-per-run
70+
run: cargo hack test --feature-powerset --depth 2 --clean-per-run --partition ${{ matrix.partition }}
6671

6772
fmt:
6873
name: Rustfmt check

0 commit comments

Comments
 (0)