Skip to content

Commit

Permalink
unified tests into matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
Bullrich committed May 23, 2024
1 parent cc6ae14 commit 0b037aa
Showing 1 changed file with 12 additions and 35 deletions.
47 changes: 12 additions & 35 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,16 @@ on: [push, pull_request]
name: Continuous integration

jobs:
check:
name: Check
test:
name: "Test"
strategy:
matrix:
cmd: [check, fmt,clippy]
include:
- cmd: fmt
args: "--all -- --check"
- cmd: clippy
arg: "-- -D warnings"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -15,36 +23,5 @@ jobs:
override: true
- uses: actions-rs/cargo@v1
with:
command: check

fmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- run: rustup component add rustfmt
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check

clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- run: rustup component add clippy
- uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings
command: ${{ matrix.cmd }}
args: ${{ matrix.arg }}

0 comments on commit 0b037aa

Please sign in to comment.