• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1name: Test coverage
2
3on:
4  push:
5    branches:
6      - master
7  pull_request:
8
9env:
10  CARGO_TERM_COLOR: always
11  RUST_BACKTRACE: full
12
13jobs:
14  coverage:
15    name: Coverage
16    runs-on: ubuntu-latest
17    steps:
18      - name: Checkout repository
19        uses: actions/checkout@v2
20
21      - name: Install Rust
22        uses: actions-rs/toolchain@v1
23        with:
24          toolchain: nightly
25          profile: minimal
26          default: true
27
28      - name: Restore cache
29        uses: Swatinem/rust-cache@v1
30
31      - name: Run cargo-tarpaulin
32        uses: actions-rs/tarpaulin@v0.1
33        with:
34          args: '--all-features --run-types Doctests,Tests'
35          timeout: 120
36
37      - name: Upload to codecov.io
38        uses: codecov/codecov-action@5a8bb4701eca7ba3673f21664b887f652c58d0a3
39        with:
40          token: ${{ secrets.CODECOV_TOKEN }}
41
42      - name: Archive code coverage results
43        uses: actions/upload-artifact@v2
44        with:
45          name: code-coverage-report
46          path: cobertura.xml
47          retention-days: 30
48