Skip to content

Cleanup and incidental changes #247

Cleanup and incidental changes

Cleanup and incidental changes #247

Workflow file for this run

name: Run Tests
on:
push:
branches:
- "develop"
pull_request:
workflow_dispatch:
env:
RUST_CHANNEL: "stable"
RUST_COV_CHANNEL: "nightly"
jobs:
test-covereage:
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install Rust toolchain
uses: moonrepo/setup-rust@v0
with:
cache: false
channel: ${{ env.RUST_COV_CHANNEL }}
- name: Install grcov
uses: SierraSoftworks/setup-grcov@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Run cargo test
run: cargo test --locked
env:
CARGO_INCREMENTAL: "0"
RUSTFLAGS: "-Zprofile -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests -Cpanic=abort"
RUSTDOCFLAGS: "-Cpanic=abort"
- name: Collect covereage data
run: grcov . --binary-path target/debug/deps/ -s . -t lcov --ignore-not-existing --ignore '../**' --ignore '/*' -o ./lcov.info
- uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./lcov.info
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, macos-latest]
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install Rust toolchain
uses: moonrepo/setup-rust@v0
with:
cache: false
channel: ${{ env.RUST_COV_CHANNEL }}
- name: Run cargo test
run: cargo test -p pindakaas --features splr,cadical,ipasir-up,trace
if: matrix.os == 'windows-latest'
- name: Run cargo test
run: cargo test --all-features
if: matrix.os != 'windows-latest'
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust toolchain and clippy
uses: moonrepo/setup-rust@v0
with:
channel: ${{ env.RUST_CHANNEL }}
components: clippy
- name: Run clippy
run: cargo clippy --tests -- -D warnings
- name: Run clippy with all features
run: cargo clippy --tests --all-features -- -D warnings