-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(ci): Do not run coverage in merge queue (#239)
## Overview Changes the codecov job to not run in the merge queue. See: matplotlib/napari-matplotlib#155
- Loading branch information
Showing
2 changed files
with
41 additions
and
33 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Rust Coverage | ||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
env: | ||
CARGO_TERM_COLOR: always | ||
jobs: | ||
coverage: | ||
runs-on: ubuntu-latest | ||
name: codecov | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
- name: Install stable | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
components: llvm-tools-preview | ||
- name: Rust cache | ||
uses: Swatinem/rust-cache@v2 | ||
with: | ||
cache-on-failure: true | ||
- name: cargo install cargo-llvm-cov | ||
uses: taiki-e/install-action@cargo-llvm-cov | ||
- name: cargo install cargo-nextest | ||
uses: taiki-e/install-action@nextest | ||
- name: cargo generate-lockfile | ||
if: hashFiles('Cargo.lock') == '' | ||
run: cargo generate-lockfile | ||
- name: cargo llvm-cov | ||
run: cargo llvm-cov nextest --locked --workspace --lcov --output-path lcov.info | ||
- name: Record Rust version | ||
run: echo "RUST=$(rustc --version)" >> "$GITHUB_ENV" | ||
- name: Upload to codecov.io | ||
uses: codecov/codecov-action@v4 | ||
with: | ||
fail_ci_if_error: true | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
env_vars: OS,RUST | ||
files: lcov.info |
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