diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2d12023..3384cdd 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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 @@ -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 }}