summaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
authorNadrieril2020-03-20 18:08:41 +0000
committerNadrieril2020-03-20 18:24:41 +0000
commit48bc731fe8eb7d4ecfad5e8f834754c3a91e4359 (patch)
tree4722f8c1b934e0398e4676d2e396dbac93e816d0 /.github/workflows
parent694ff62501e534b7f93a1813abc12f73ec695fd8 (diff)
Split coverage by feature
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/coverage.yml50
1 files changed, 50 insertions, 0 deletions
diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml
index ba49b7f..1957e90 100644
--- a/.github/workflows/coverage.yml
+++ b/.github/workflows/coverage.yml
@@ -5,6 +5,7 @@ on:
branches: [ master ]
jobs:
+ # cargo test normally
grcov:
name: Gather coverage data with grcov
runs-on: ubuntu-latest
@@ -40,3 +41,52 @@ jobs:
with:
token: ${{secrets.CODECOV_TOKEN}}
file: ${{steps.grcov.outputs.report}}
+
+ # Collect each feature independently to help identify missing tests
+ grcov-split:
+ name: Gather coverage data with grcov
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ feature:
+ - parser
+ - printer
+ - binary
+ - import
+ - beta_normalize
+ - alpha_normalize
+ - type_inference
+ steps:
+ - name: Checkout branch
+ uses: actions/checkout@master
+ with:
+ submodules: true
+ - name: Setup Rust toolchain
+ uses: actions-rs/toolchain@v1
+ with:
+ profile: minimal
+ # toolchain: nightly
+ toolchain: nightly-2020-03-12 # latest nightly makes `quote` crash with -Zno-landing-pads
+ override: true
+ - name: Ensure workspace is clean
+ uses: actions-rs/cargo@v1
+ with:
+ command: clean
+ - name: Run tests with -Zprofile
+ uses: actions-rs/cargo@v1
+ with:
+ command: test
+ args: tests::spec::${{matrix.feature}}
+ env:
+ CI_GRCOV: '1' # Tell the test harness to increase stack size
+ CARGO_INCREMENTAL: '0'
+ RUSTFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Zno-landing-pads'
+ - name: Run grcov
+ id: grcov
+ uses: actions-rs/grcov@v0.1
+ - name: Upload coverage data to codecov.io
+ uses: codecov/codecov-action@v1
+ with:
+ token: ${{secrets.CODECOV_TOKEN}}
+ file: ${{steps.grcov.outputs.report}}
+ flags: ${{matrix.feature}}