Skip to content

Commit

Permalink
Update codecov CI to stable version of Rust (#10)
Browse files Browse the repository at this point in the history
* Update codecov CI to stable version of Rust

* Get rid of -Z option in normal CI build action
  • Loading branch information
alancai98 authored Jun 3, 2023
1 parent 4284ae9 commit 824031f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci_build_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
command: build
args: --verbose --workspace
- name: Cargo Test
run: cargo test --verbose --workspace -- -Z unstable-options
run: cargo test --verbose --workspace
# `clippy-check` will run `cargo clippy` on new pull requests. Due to a limitation in GitHub
# permissions, the behavior of the Action is different depending on the source of the PR. If the
# PR comes from the partiql-lang-rust project itself, any suggestions will be added to the PR as comments.
Expand Down
34 changes: 14 additions & 20 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,25 +25,19 @@ jobs:
- name: Rust Toolchain
uses: dtolnay/rust-toolchain@master
with:
# Coverage requires the nightly toolchain because it uses the presently unstable `-Z profile` feature
# See: https://github.com/rust-lang/rust/issues/42524
# See also: https://github.com/actions-rs/grcov#usage
# nightly can be very volatile--pin this to a version we know works well...
toolchain: nightly-2023-03-09
- name: Cargo Test
run: cargo test --verbose --workspace
env:
CARGO_INCREMENTAL: '0'
# https://github.com/marketplace/actions/rust-grcov
# For some reason the panic=abort modes don't work for build script...
#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'
RUSTFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off'
RUSTDOCFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off'
- id: coverage
name: Code Coverage
uses: actions-rs/[email protected]
toolchain: stable
# We need this component to generate source coverage in stable
components: llvm-tools-preview
- name: Cargo Install
run: cargo install cargo-llvm-cov
# Conformance tests are run with 'conformance_test' feature. Since step runs with 'all-features', the conformance
# test are also run, which can cause `cargo test` to fail. Add 'continue-on-error' step to prevent GH Actions
# failure.
- name: Cargo Test w/ Coverage
continue-on-error: true
run: cargo llvm-cov --verbose --workspace --all-features --no-fail-fast --codecov --output-path codecov.json
- name: Codecov Upload
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v3
with:
files: ${{ steps.coverage.outputs.report }}
files: codecov.json
fail_ci_if_error: true

0 comments on commit 824031f

Please sign in to comment.