ci: partition tests (#1349)

This commit is contained in:
Bjerg
2023-02-14 20:37:59 +01:00
committed by GitHub
parent 816df4b0da
commit d5d685b5b2
2 changed files with 10 additions and 0 deletions

View File

@ -18,7 +18,11 @@ jobs:
test:
# Pin to `20.04` instead of `ubuntu-latest`, until ubuntu-latest migration is complete
# See also <https://github.com/foundry-rs/foundry/issues/3827>
name: test (partition ${{ matrix.partition }}/${{ strategy.job-total }})
runs-on: ubuntu-20.04
strategy:
matrix:
partition: [1, 2]
steps:
- name: Checkout sources
uses: actions/checkout@v3
@ -50,6 +54,7 @@ jobs:
run: |
cargo llvm-cov nextest --lcov --output-path lcov.info \
--locked --workspace --all-features \
--partition hash:${{ matrix.partition }}/${{ strategy.job-total }} \
-E 'kind(test)'
- name: Upload coverage data to codecov

View File

@ -17,7 +17,11 @@ jobs:
test:
# Pin to `20.04` instead of `ubuntu-latest`, until ubuntu-latest migration is complete
# See also <https://github.com/foundry-rs/foundry/issues/3827>
name: test (partition ${{ matrix.partition }}/${{ strategy.job-total }})
runs-on: ubuntu-20.04
strategy:
matrix:
partition: [1, 2, 3]
steps:
- name: Checkout sources
uses: actions/checkout@v3
@ -38,6 +42,7 @@ jobs:
run: |
cargo llvm-cov nextest --lcov --output-path lcov.info \
--locked --workspace --all-features \
--partition hash:${{ matrix.partition }}/${{ strategy.job-total }} \
-E 'kind(lib)' -E 'kind(bin)' -E 'kind(proc-macro)'
- name: Upload coverage data to codecov