Skip to content

chore: setup codecov (#20) #114

chore: setup codecov (#20)

chore: setup codecov (#20) #114

Workflow file for this run

name: CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
env:
RUST_BACKTRACE: full
steps:
- uses: actions/checkout@v3
- name: Lint
run: cargo clippy --all-features -- -D warnings
- name: Test
run: cargo test --all-targets --all-features
- name: Build
run: cargo build --all-targets --all-features
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
if: ${{ matrix.os == 'ubuntu-latest' }}
- name: Generate code coverage
shell: bash
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
cargo llvm-cov --ignore-filename-regex cli.rs --lcov --output-path lcov.info
- name: Upload coverage to Codecov
if: ${{ matrix.os == 'ubuntu-latest' }}
uses: codecov/codecov-action@v4
with:
files: lcov.info
fail_ci_if_error: false
token: ${{ secrets.CODECOV_TOKEN }}