Skip to content

chore: generate coverage report #89

chore: generate coverage report

chore: generate coverage report #89

Workflow file for this run

name: main
on:
pull_request:
types: [opened, reopened, synchronize]
branches: [main]
push:
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2.7.3
- run: make build
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dprint/check@v2.2
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- uses: Swatinem/rust-cache@v2.7.3
- run: make lint
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2.7.3
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@v2.42.0
with:
tool: cargo-llvm-cov
- name: Run tests with coverage report
run: cargo llvm-cov --all-features --all-targets --lcov --workspace --output-path lcov.info
- name: Upload test coverage report
uses: actions/upload-artifact@v4
with:
name: lcov.info
path: lcov.info
coverage:
needs: test
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
name: lcov.info
path: .
- uses: coverallsapp/github-action@v2.3.0
with:
base-path: /
file: lcov.info
github-token: ${{ secrets.GITHUB_TOKEN }}