BWStearns is building and testing Circadian Tools π #56
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: Circadian Tools Build Test | |
run-name: ${{ github.actor }} is building and testing Circadian Tools π | |
on: | |
pull_request: | |
branches: [ main ] | |
types: [ opened, synchronize, closed ] | |
paths-ignore: | |
- "README.md" | |
- "terraform/**" | |
push: | |
branches: [ main ] | |
paths-ignore: | |
- "README.md" | |
- "terraform/**" | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Cache dependencies | |
id: cache-dependencies | |
uses: actions/cache@v2 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
target | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
- uses: actions-rs/toolchain@v1 | |
name: Install nightly Rust toolchain with llvm-tools-preview | |
with: | |
toolchain: nightly | |
override: true | |
profile: minimal | |
components: llvm-tools-preview | |
- name: Install grcov | |
uses: actions-rs/[email protected] | |
with: | |
crate: grcov | |
version: 0.8.0 | |
use-tool-cache: true | |
- name: Run cargo test | |
uses: actions-rs/cargo@v1 | |
with: | |
command: test | |
args: --all-features --no-fail-fast | |
env: | |
RUSTC_BOOTSTRAP: 1 | |
RUSTFLAGS: '-C instrument-coverage' | |
RUSTDOCFLAGS: '-C instrument-coverage' | |
LLVM_PROFILE_FILE: 'codecov-instrumentation-%p-%m.profraw' | |
- name: grcov | |
run: grcov . --binary-path ./target/debug --ignore="/*" -s ./src -t lcov --branch --ignore-not-existing -o lcov.info | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
files: ./lcov.info | |
token: ${{ secrets.CODECOV_TOKEN }} |