Update pipelines #15
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: Test π€ | |
on: | |
pull_request: | |
push: | |
paths: | |
- 'src/**' | |
- '.github/workflows/test.yml' | |
branches: | |
- '**' | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
test: | |
name: Test | |
strategy: | |
matrix: | |
include: | |
- os: ubuntu-latest | |
target: x86_64-unknown-linux-gnu | |
- os: macOS-latest | |
target: x86_64-apple-darwin | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@v1 | |
with: | |
toolchain: stable | |
targets: ${{ matrix.target }} | |
- name: Run cargo test | |
run: cargo test --locked --target ${{ matrix.target }} | |
- name: Run tests feature variation | |
run: cargo test --locked --target ${{ matrix.target }} --no-default-features | |
rusfmt: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@v1 | |
with: | |
toolchain: stable | |
components: rustfmt | |
- name: Check formatting | |
run: cargo fmt --all -- --check | |
clippy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@v1 | |
with: | |
toolchain: stable | |
components: clippy | |
- name: Check formatting | |
run: cargo clippy --all-features -- -D warnings |