Skip to content

Commit

Permalink
Fix codecov.io
Browse files Browse the repository at this point in the history
  • Loading branch information
vcfxb committed Mar 16, 2024
1 parent c707dfd commit 839d1a7
Showing 1 changed file with 27 additions and 7 deletions.
34 changes: 27 additions & 7 deletions .github/workflows/codecov-io.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,21 @@
on: ["push", "pull_request"]
on:
push:
branches:
# https://stackoverflow.com/questions/64635032/github-actions-run-on-push-to-all-branches
- "**"
pull_request:
branches:
- "main"
env:
CARGO_TERM_COLOR: always

name: codecov.io Code Coverage
jobs:
coverage:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4

- name: Install LLVM
# See: https://apt.llvm.org/
# Last line: https://gitlab.com/taricorp/llvm-sys.rs/-/issues/13
Expand All @@ -14,16 +24,26 @@ jobs:
chmod +x llvm.sh
sudo ./llvm.sh 17
sudo apt install libpolly-17-dev libz-dev
- uses: actions-rs/cargo@v1
- uses: actions-rs/toolchain@v1
with:
command: test
args: --all-features --no-fail-fast
toolchain: nightly
override: true

- name: Run tests
run: cargo test --verbose
env:
RUSTFLAGS: '-C instrument-coverage'
LLVM_PROFILE_FILE: 'cargo-test-%p-%m.profraw'
CARGO_INCREMENTAL: '0'
RUSTFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests'
RUSTDOCFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests'

- name: rust-grcov
# You may pin to the exact commit or the version.
# uses: actions-rs/grcov@bb47b1ed7883a1502fa6875d562727ace2511248
uses: actions-rs/[email protected]

- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: vcfxb/wright-lang

0 comments on commit 839d1a7

Please sign in to comment.