name: Rust
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Install cargo-nextest
uses: taiki-e/install-action@nextest
- name: Build
run: cargo build --verbose
- name: Run tests no-features
run: cargo nextest run --verbose --no-default-features --profile ci
- name: Run tests all-features
run: cargo nextest run --verbose --all-features --profile ci
- name: Run doc tests
run: cargo test --doc --all-features
- name: Upload test results
uses: actions/upload-artifact@v4
if: always()
with:
name: test-results
path: target/nextest/ci/junit.xml