aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/coverage.yml
blob: e1637d63a5563817879649e03e76b347aa9f4aeb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: Coverage 🛌

on:
  push:
    paths:
      - "src/**"
      - "Cargo.toml"
  pull_request:
    paths:
      - "src/**"
      - "Cargo.toml"

jobs:
  coverage:
    runs-on: ubuntu-20.04

    steps:
      - name: Checkout 🛒
        uses: actions/checkout@v2

      - name: Toolchain 🧰
        uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: nightly-2021-02-20
          components: rustfmt, clippy
          override: true

      - name: Tarpaulin ⛺
        uses: actions-rs/[email protected]
        with:
          version: '0.15.0'
          args: '-- --test-threads 1'

      - name: Upload to Codecov ✈
        uses: codecov/[email protected]
        with:
          token: ${{ secrets.CODECOV_TOKEN }}

      - name: Archive Coverage Results 🗃
        uses: actions/upload-artifact@v1
        with:
          name: code-coverage-report
          path: cobertura.xml