Update for partiql-lang-rust
v0.7
#91
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: Code Coverage | |
on: [push, pull_request] | |
env: | |
RUST_TEST_TIME_UNIT: 150,5000 | |
RUST_TEST_TIME_INTEGRATION: 150,5000 | |
jobs: | |
build: | |
name: Build and Test | |
runs-on: ${{ matrix.os }} | |
# We want to run on external PRs, but not on internal ones as push automatically builds | |
# H/T: https://github.com/Dart-Code/Dart-Code/commit/612732d5879730608baa9622bf7f5e5b7b51ae65 | |
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != 'partiql/partiql-rust-cli' | |
strategy: | |
matrix: | |
os: [ubuntu-20.04] | |
steps: | |
- name: Git Checkout | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- 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] | |
- name: Codecov Upload | |
uses: codecov/codecov-action@v1 | |
with: | |
files: ${{ steps.coverage.outputs.report }} |