Merge pull request #52 from waywardmonkeys/adjust-msrv #89
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: | |
push: | |
branches: | |
- master | |
paths: | |
- '.github/workflows/test.yml' | |
- 'src/**/*.rs' | |
- 'tests/**/*.rs' | |
- 'Cargo.toml' | |
pull_request: | |
types: [opened, synchronize, reopened, ready_for_review] | |
branches: | |
- '**' | |
paths: | |
- '.github/workflows/test.yml' | |
- 'src/**/*.rs' | |
- 'tests/**/*.rs' | |
- 'Cargo.toml' | |
jobs: | |
rustfmt: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
toolchain: stable | |
components: rustfmt | |
- uses: actions/checkout@v4 | |
- name: Check formatting | |
run: cargo fmt --all -- --check | |
clippy: | |
needs: rustfmt | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [macos-latest, windows-latest, ubuntu-latest] | |
# os: [macos-latest, windows-latest] | |
steps: | |
- uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
toolchain: stable | |
components: clippy | |
- uses: actions/checkout@v4 | |
- name: Run `cargo clippy` | |
run: cargo clippy --all -- -D warnings | |
test: | |
needs: clippy | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
# No Linux test for now as it just fails due to not having a desktop environment. | |
os: [macos-latest, windows-latest] | |
steps: | |
- uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
toolchain: stable | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Run `cargo test` | |
run: cargo test --all |