Skip to content

Commit

Permalink
feat: test with different os and versions in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
kenkoooo committed Dec 2, 2023
1 parent 991e41f commit e9f2e4b
Showing 1 changed file with 10 additions and 27 deletions.
37 changes: 10 additions & 27 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,39 +7,22 @@ on:
- main
env:
RUSTFLAGS: -Dwarnings
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse

jobs:
format:
name: Format
runs-on: ubuntu-latest
test:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
version: [1.68, stable, beta, nightly]
name: Test with Rust ${{ matrix.version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.65
components: rustfmt
toolchain: ${{ matrix.version }}
components: rustfmt, clippy
- run: cargo fmt --all -- --check

clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.65
components: clippy
- uses: Swatinem/rust-cache@v2
- run: cargo clippy --all-targets --all-features

test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.65
components: rustfmt
- uses: Swatinem/rust-cache@v2
- run: cargo test

0 comments on commit e9f2e4b

Please sign in to comment.