diff --git a/.github/workflows/primary.yml b/.github/workflows/primary.yml index 56e434d..7935508 100644 --- a/.github/workflows/primary.yml +++ b/.github/workflows/primary.yml @@ -42,10 +42,37 @@ jobs: steps: - uses: actions/checkout@v2 - uses: Swatinem/rust-cache@v1 - - name: Build - run: cargo build --tests --verbose - - name: Run tests - run: cargo test --verbose + - uses: actions-rs/toolchain@v1 + with: + components: llvm-tools-preview + override: true + toolchain: stable + - uses: actions-rs/cargo@v1 + with: + command: test + args: --all-features --no-fail-fast + env: + LLVM_PROFILE_FILE: "nldl-%p-%m.profraw" + RUSTFLAGS: '-Cinstrument-coverage' + - uses: actions-rs/cargo@v1 + with: + command: install + args: grcov + - id: coverage + run: | + grcov \ + --branch \ + --ignore-not-existing \ + --llvm \ + --binary-path=target/debug/ \ + --output-path=target/debug/lcov.info \ + --output-type=lcov \ + --source-dir=. \ + . + echo '::set-output name=report::target/debug/lcov.info' + - uses: codecov/codecov-action@v2 + with: + files: ${{ steps.coverage.outputs.report }} check-readme: runs-on: ubuntu-latest