are tests worth writing? maybe time to reconsider. #90
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: coverage | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
merge_group: | |
jobs: | |
coverage: | |
runs-on: ubuntu-latest | |
env: | |
CARGO_TERM_COLOR: always | |
# strategy: | |
# fail-fast: false | |
# matrix: | |
# config: | |
# - { target: "x86_64-unknown-linux-gnu" } | |
# - { target: "wasm32-unknown-unknown" } | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup dependencies | |
run: sudo apt-get update; sudo apt-get install pkg-config libx11-dev libasound2-dev libudev-dev | |
- name: Install Rust | |
run: | | |
rustup override set nightly-2023-08-20 | |
rustup component add llvm-tools-preview --toolchain nightly-2023-08-20 | |
- name: Cache rust dependencies | |
uses: Swatinem/rust-cache@v2 | |
with: | |
shared-key: coverage | |
prefix-key: v0 #increment this to bust the cache if needed | |
save-if: ${{ github.event_name == 'push' }} | |
- name: Install cargo-llvm-cov | |
uses: taiki-e/install-action@cargo-llvm-cov | |
- name: Generate code coverage | |
run: cargo llvm-cov --workspace --codecov --no-fail-fast --output-path codecov.json | |
- 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 |