From efdaa2f1c3fdbac55fb3d98adc02338778d78ff2 Mon Sep 17 00:00:00 2001 From: Sebastian Schmidt Date: Wed, 2 Jun 2021 17:15:59 +0300 Subject: [PATCH] Fix CI fmt command and make more use of test matrix. --- .github/workflows/ci.yml | 40 +++++++++++++++++++--------------------- 1 file changed, 19 insertions(+), 21 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 19483b7..aedeb1a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,13 +4,26 @@ on: [push, pull_request] jobs: build_and_test: - name: Build, Test, Format & Lint + name: ${{matrix.command.name}} ${{matrix.toolchain}} runs-on: ubuntu-latest strategy: fail-fast: false matrix: - rust: [stable, beta, nightly, 1.24.0] + toolchain: [stable, beta, nightly, 1.24.0] + command: + - name: Check + command: check + args: "" + - name: Test + command: test + args: "" + - name: Format + command: fmt + args: -- --check + - name: Lint + command: clippy + args: "" steps: - uses: actions/checkout@v2 @@ -25,25 +38,10 @@ jobs: - uses: actions-rs/toolchain@v1 with: - toolchain: ${{ matrix.rust }} + toolchain: ${{ matrix.toolchain }} - - name: 🔨 Build + - name: ${{matrix.command.name}} uses: actions-rs/cargo@v1 with: - command: build - - - name: 🔎 Test - uses: actions-rs/cargo@v1 - with: - command: test - - - name: Format - uses: actions-rs/cargo@v1 - with: - command: fmt - args: --check - - - name: Lint - uses: actions-rs/cargo@v1 - with: - command: clippy \ No newline at end of file + command: ${{matrix.command.command}} + args: ${{matrix.command.args}} \ No newline at end of file