Skip to content

Commit fe0dcf4

Browse files
[ci] Partition Coverage (#2198)
1 parent 8be5adf commit fe0dcf4

File tree

4 files changed

+15
-7
lines changed

4 files changed

+15
-7
lines changed

.github/actions/setup/action.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ runs:
1616
path: |
1717
~/.cargo/registry
1818
~/.cargo/git
19-
~/AppData/Local/cargo/registry
20-
~/AppData/Local/cargo/git
2119
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
2220
restore-keys: |
2321
${{ runner.os }}-cargo-registry-
@@ -36,7 +34,7 @@ runs:
3634
with:
3735
path: |
3836
~/.cargo/bin/cargo-cache
39-
~/AppData/Local/cargo/bin/cargo-cache.exe
37+
~/.cargo/bin/cargo-cache.exe
4038
key: ${{ runner.os }}-cargo-cache-${{ steps.rust-version.outputs.rust_version }}
4139
- name: Maintain cargo cache
4240
continue-on-error: true

.github/workflows/coverage.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,20 @@ permissions:
1010
contents: read
1111

1212
concurrency:
13-
group: coverage-${{ github.head_ref }}
13+
group: coverage-${{ github.head_ref || github.ref_name || github.run_id }}
1414
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
1515

1616
env:
1717
CARGO_TERM_COLOR: always
1818

1919
jobs:
2020
Coverage:
21+
name: "Coverage (partition: ${{ matrix.partition }}/8)"
2122
runs-on: ubuntu-latest
2223
timeout-minutes: 90
24+
strategy:
25+
matrix:
26+
partition: [1, 2, 3, 4, 5, 6, 7, 8]
2327
steps:
2428
- name: Checkout repository
2529
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4
@@ -46,15 +50,16 @@ jobs:
4650
- name: Remove fuzz targets from Cargo.toml
4751
run: |
4852
sed -i.bak '/fuzz/d' Cargo.toml
49-
- name: Install cargo-llvm-cov
53+
- name: Install coverage tooling
5054
uses: taiki-e/install-action@0c5db7f7f897c03b771660e91d065338615679f4 # v2.60.0
5155
with:
52-
56+
5357
- name: Generate coverage report
54-
run: cargo llvm-cov --workspace --lcov --output-path lcov.info -- --include-ignored
58+
run: cargo llvm-cov nextest --workspace --lcov --output-path lcov.info --partition hash:${{ matrix.partition }}/8 --run-ignored all
5559
- name: Upload coverage to Codecov
5660
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
5761
with:
5862
files: lcov.info
5963
fail_ci_if_error: true
6064
token: ${{ secrets.CODECOV_TOKEN }}
65+
flags: coverage-partition-${{ matrix.partition }}

.github/workflows/fast.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ on:
99
permissions:
1010
contents: read
1111

12+
concurrency:
13+
group: tests-fast-${{ github.head_ref || github.ref_name || github.run_id }}
14+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
15+
1216
env:
1317
CARGO_TERM_COLOR: always
1418
UDEPS_VERSION: 0.1.57

codecov.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ comment:
55
require_head: false
66
require_base: false
77
hide_project_coverage: false
8+
after_n_builds: 8
89

910
coverage:
1011
status:

0 commit comments

Comments
 (0)