Merge pull request #16 from Kobzol/Kobzol-patch-1 #60
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
## Based on https://github.com/actions-rs/meta/blob/master/recipes/quickstart.md | |
name: Check | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
test: | |
name: Test | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
include: | |
- rust-version: stable | |
os: ubuntu-latest | |
- rust-version: beta | |
os: ubuntu-latest | |
- rust-version: nightly | |
os: ubuntu-latest | |
- rust-version: stable | |
os: windows-latest | |
- rust-version: stable | |
os: macos-12 | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.rust-version }} | |
components: clippy, rustfmt | |
- uses: Swatinem/rust-cache@v1 | |
- name: Build | |
run: cargo build --workspace --all-targets | |
- name: Run tests | |
run: cargo test --workspace --all-targets | |
- name: Lint | |
run: cargo clippy --workspace --all-targets | |
- name: Check Rust formatting | |
run: cargo fmt --all -- --check |