Skip to content

Commit

Permalink
📝 only lint on linux and windows
Browse files Browse the repository at this point in the history
  • Loading branch information
Xudong-Huang committed Apr 10, 2024
1 parent 5e09e4e commit 2044e96
Showing 1 changed file with 10 additions and 29 deletions.
39 changes: 10 additions & 29 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,15 @@ env:

jobs:
lints:
name: Run cargo fmt and cargo clippy
runs-on: ubuntu-latest
name: Run cargo fmt and cargo clippy ${{ matrix.rust }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
rust:
- stable
os:
- ubuntu-latest
- windows-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
Expand All @@ -40,30 +47,4 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: clippy
args: --no-default-features -- -D warnings
test:
name: Test ${{ matrix.rust }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
rust:
- stable
- nightly
os:
- ubuntu-latest
- windows-latest
- macOS-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install Rust (${{ matrix.rust }})
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
- name: Run cargo clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: --examples
args: --examples -- -D warnings

0 comments on commit 2044e96

Please sign in to comment.