Formatting fixes in README #24
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Cargo Tests | |
on: | |
push: | |
branches: [ main, master ] | |
pull_request: | |
branches: [ main, master ] | |
jobs: | |
cargo: | |
timeout-minutes: 12 | |
runs-on: ubuntu-latest | |
permissions: | |
checks: write | |
packages: read | |
contents: read | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
# Sync with dockerfiles/cargo-base/Dockerfile | |
toolchain: 1.75 | |
override: true | |
components: rustfmt, clippy, llvm-tools-preview | |
- name: Setup cargo cache | |
uses: Swatinem/rust-cache@v2 | |
continue-on-error: false | |
- name: Install cargo-llvm-cov | |
uses: taiki-e/install-action@cargo-llvm-cov | |
- name: Install nextest | |
uses: taiki-e/install-action@nextest | |
- name: Run cargo fmt | |
run: cargo fmt --check | |
- name: Run tests | |
run: cargo llvm-cov --all-features --workspace --codecov --output-path codecov.json nextest | |
- name: Show coverage report | |
run: cargo llvm-cov report | |
- name: Check link | |
uses: actions-rs/clippy-check@v1 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
args: --all-targets --all-features -- -D warnings | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos | |
files: codecov.json | |
fail_ci_if_error: true | |
- name: Run cargo check | |
run: cargo check |