Merge pull request #22 from Nukesor/dependabot/github_actions/actions… #7
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: Lint | |
on: | |
push: | |
branches: [main] | |
paths: | |
- '.github/**/*' | |
- '**.rs' | |
- 'Cargo.toml' | |
pull_request: | |
branches: [main] | |
paths: | |
- '.github/**/*' | |
- '**.rs' | |
- 'Cargo.toml' | |
jobs: | |
test: | |
name: Tests on ${{ matrix.os }} for ${{ matrix.toolchain }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
toolchain: [stable] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup Rust toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: ${{ matrix.toolchain }} | |
override: true | |
components: rustfmt, clippy | |
- name: cargo build | |
uses: actions-rs/cargo@v1 | |
with: | |
command: build | |
- name: cargo fmt | |
uses: actions-rs/cargo@v1 | |
with: | |
command: fmt | |
args: --all -- --check | |
- name: cargo clippy | |
uses: actions-rs/cargo@v1 | |
with: | |
command: clippy | |
args: -- -D warnings |