Skip to content

Commit

Permalink
Expand CI test job
Browse files Browse the repository at this point in the history
- Run on macos, linux and windows
- Remove explicit build target (host arch is fine)
  • Loading branch information
FreezyLemon committed Apr 17, 2024
1 parent f599f26 commit 9c7caee
Showing 1 changed file with 11 additions and 17 deletions.
28 changes: 11 additions & 17 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,31 +24,25 @@ jobs:
run: cargo clippy

test:
name: Test
needs: clippy
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
toolchain: stable
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
toolchain: nightly
os: [ubuntu-latest, macos-latest, windows-latest]
toolchain: [stable, nightly]

steps:
- uses: actions/checkout@v4
- name: Install toolchain
- name: Install Rust ${{ matrix.toolchain }}
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.toolchain }}
- name: Test nightly feature (if possible)
if: ${{ matrix.toolchain == 'nightly' }}
run: |
cargo test --target ${{ matrix.target }} --features=nightly
cargo test --target ${{ matrix.target }} --benches --features=nightly

- name: Test nightly feature
if: matrix.toolchain == 'nightly'
run: cargo test --all-targets --features=nightly

- name: Test default features
run: |
cargo test --target ${{ matrix.target }}
if: matrix.toolchain != 'nightly'
run: cargo test --all-targets

0 comments on commit 9c7caee

Please sign in to comment.