more sensible default for clap derive #8
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
on: | |
push: | |
branches: [main] | |
pull_request: | |
name: codecov | |
jobs: | |
codecov: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Install stable | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
components: llvm-tools-preview | |
- name: cargo install cargo-llvm-cov | |
uses: taiki-e/install-action@cargo-llvm-cov | |
- name: cargo generate-lockfile | |
if: hashFiles('Cargo.lock') == '' | |
run: cargo generate-lockfile | |
- name: Restore cached target/ | |
id: target-cache-restore | |
uses: actions/cache/restore@v3 | |
with: | |
path: | | |
target | |
/home/runner/.cargo | |
key: coverage-target | |
- name: cargo llvm-cov clean | |
run: cargo llvm-cov clean --workspace | |
- name: cargo llvm-cov | |
run: cargo llvm-cov --locked --all-features --no-report --release | |
- name: Save cached target/ | |
id: target-cache-save | |
uses: actions/cache/save@v3 | |
with: | |
path: | | |
target | |
/home/runner/.cargo | |
key: ${{ steps.target-cache-restore.outputs.cache-primary-key }} | |
- name: cargo llvm-cov report | |
run: cargo llvm-cov report --release --lcov --output-path lcov.info | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
fail_ci_if_error: true |