From e9f2e4b2e2f2a131790a3514d0dcc906e1d2d55c Mon Sep 17 00:00:00 2001 From: kenkoooo Date: Sat, 2 Dec 2023 13:57:46 +0900 Subject: [PATCH] feat: test with different os and versions in CI --- .github/workflows/ci.yml | 37 ++++++++++--------------------------- 1 file changed, 10 insertions(+), 27 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 55805d7..30ac3d9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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