Skip to content

👷 add test coverage and openssf scorecard #24

👷 add test coverage and openssf scorecard

👷 add test coverage and openssf scorecard #24

Workflow file for this run

name: Test
on:
push:
branches:
- main
pull_request:
branches:
- main
env:
RUSTFLAGS: -D warnings
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@nightly
- uses: Swatinem/rust-cache@v2
- run: cargo test -- --nocapture
- name: Generate coverage report
run: cargo install cargo-tarpaulin && cargo tarpaulin --out Xml
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4.0.1
with:
files: ./coverage.xml
token: ${{ secrets.CODECOV_TOKEN }}
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@nightly
- uses: Swatinem/rust-cache@v2
- run: cargo clippy --all --all-features --all-targets -- -D warnings
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt
- uses: Swatinem/rust-cache@v2
- run: cargo +nightly fmt --all -- --check
typos:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: crate-ci/typos@v1.16.23
with:
files: .