Skip to content

Commit

Permalink
try to fix codecov again
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacholt100 committed Sep 23, 2023
1 parent 2e1efd3 commit b082910
Showing 1 changed file with 46 additions and 49 deletions.
95 changes: 46 additions & 49 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,57 +1,54 @@
name: Test

on:
push:
branches-ignore:
- master # master is a protected branch so tests will be run when we create a PR
pull_request:
branches: "**"
workflow_call:
push:
branches-ignore:
- master # master is a protected branch so tests will be run when we create a PR
pull_request:
branches: "**"
workflow_call:

env:
CARGO_TERM_COLOR: always

jobs:
codecov:
runs-on: ubuntu-latest
env:
CARGO_TERM_COLOR: always
steps:
- uses: actions/checkout@v4
- name: Install nightly toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- name: Generate code coverage
run: cargo llvm-cov --all-features --workspace --json --output-path cov.json
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: cov.json
fail_ci_if_error: true
build_stable:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install latest stable Rust
run: rustup install stable
- name: Check crate builds on stable
run: cargo build --features serde,numtraits,rand,arbitrary && cargo build
test_nightly:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install latest nightly Rust
run: rustup install nightly
- name: Set nightly as default
run: rustup default nightly
- name: Build
run: cargo build --all-features --verbose
- name: Run tests
run: sh scripts/run_all_tests.sh
- name: Run doc tests
run: cargo test --all-features --doc && cargo test --doc
codecov:
runs-on: ubuntu-latest
env:
CARGO_TERM_COLOR: always
steps:
- uses: actions/checkout@v4
- name: Install Rust
run: rustup update stable
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- name: Generate code coverage
run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: lcov.info
fail_ci_if_error: true
build_stable:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install latest stable Rust
run: rustup install stable
- name: Check crate builds on stable
run: cargo build --features serde,numtraits,rand,arbitrary && cargo build
test_nightly:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install latest nightly Rust
run: rustup install nightly
- name: Set nightly as default
run: rustup default nightly
- name: Build
run: cargo build --all-features --verbose
- name: Run tests
run: sh scripts/run_all_tests.sh
- name: Run doc tests
run: cargo test --all-features --doc && cargo test --doc

0 comments on commit b082910

Please sign in to comment.