File: coverage.yml

package info (click to toggle)
rust-quick-junit 0.5.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 240 kB
  • sloc: xml: 45; awk: 19; sh: 18; makefile: 2
file content (43 lines) | stat: -rw-r--r-- 1,377 bytes parent folder | download
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
on:
  push:
    branches: [main, auto, canary]
  pull_request:
    branches:
      - main

name: Test coverage

jobs:
  coverage:
    name: Collect test coverage
    runs-on: ubuntu-latest
    # nightly rust might break from time to time
    continue-on-error: true
    env:
      RUSTFLAGS: -D warnings
      CARGO_TERM_COLOR: always
    steps:
      - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
        # Nightly Rust is used for cargo llvm-cov --doc below.
      - uses: dtolnay/rust-toolchain@nightly
        with:
          components: llvm-tools-preview
      - uses: Swatinem/rust-cache@82a92a6e8fbeee089604da2575dc567ae9ddeaab # v2

      - name: Install latest nextest release
        uses: taiki-e/install-action@nextest
      - name: Install cargo-llvm-cov
        uses: taiki-e/install-action@cargo-llvm-cov

      - name: Collect coverage data
        # Generate separate reports for nextest and doctests, and combine them.
        run: |
          cargo llvm-cov --no-report nextest
          cargo llvm-cov --no-report --doc
          cargo llvm-cov report --doctests --lcov --output-path lcov.info
      - name: Upload coverage data to codecov
        uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # v4
        env:
          CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
        with:
          files: lcov.info