Updated clap dependency version #35
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 build & test | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Build | |
run: cargo build --verbose | |
- name: Run tests | |
run: RUSTFLAGS="-C instrument-coverage" cargo test --tests --verbose | |
- name: "`cargo-llvm-cov` ~ install" | |
uses: taiki-e/install-action@cargo-llvm-cov | |
- name: Generate coverage data | |
id: coverage | |
shell: bash | |
run: | | |
## Generate coverage data | |
COVERAGE_REPORT_DIR="target/debug" | |
COVERAGE_REPORT_FILE="${COVERAGE_REPORT_DIR}/lcov.info" | |
mkdir -p "${COVERAGE_REPORT_DIR}" | |
# display coverage files | |
cargo llvm-cov --all-features --workspace --lcov --output-path "${COVERAGE_REPORT_FILE}" | |
echo "report=${COVERAGE_REPORT_FILE}" >> $GITHUB_OUTPUT | |
- name: Upload coverage reports to Codecov | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
uses: codecov/codecov-action@v3 | |
with: | |
file: ${{ steps.coverage.outputs.report }} |