Clean up and expand tests #709
Workflow file for this run
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
on: | |
push: | |
tags: | |
# Full version | |
- "[0-9]+.[0-9]+.[0-9]+" | |
- "v[0-9]+.[0-9]+.[0-9]+" | |
# Prerelease version | |
- "[0-9]+.[0-9]+.[0-9]+-*" | |
- "v[0-9]+.[0-9]+.[0-9]+-*" | |
pull_request: | |
branches: | |
# Trigger on pull requests into main/master | |
- main | |
- master | |
types: [ opened, synchronize ] | |
name: Continuous integration | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
check: | |
name: Check | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
rust: | |
- stable | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.rust }} | |
- run: cargo check | |
test: | |
name: Test Suite | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
rust: | |
- stable | |
- 1.67.0 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.rust }} | |
- run: cargo test | |
test-feature-matrix: | |
name: Test Suite (feature-matrix) | |
strategy: | |
matrix: | |
rust: | |
- stable | |
- 1.67.0 | |
flags: | |
- "--all-features" | |
- "--no-default-features" | |
os: | |
- "ubuntu-latest" | |
- "macos-latest" | |
# - "windows-latest" TODO | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.rust }} | |
components: clippy | |
- run: cargo clippy ${{ matrix.flags }} -- -D warnings | |
- run: cargo test ${{ matrix.flags }} | |
compat-tests: | |
name: Compatibility Test Suite | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
rust: | |
- stable | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.rust }} | |
- run: cargo test --features test-with-podman | |
fmt: | |
name: Rustfmt | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
rust: | |
- stable | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.rust }} | |
components: rustfmt | |
- run: cargo fmt --all -- --check | |
clippy: | |
name: Clippy | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
rust: | |
- stable | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.rust }} | |
components: clippy | |
- run: cargo clippy -- -D warnings | |
tarpaulin: | |
name: Tarpaulin | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
rust: | |
- stable | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.rust }} | |
components: clippy | |
- run: cargo install cargo-tarpaulin | |
- run: cargo tarpaulin --out xml | |