name: Continuous Integration on: [push, pull_request] jobs: build_and_test: name: ${{matrix.command.name}} (${{matrix.toolchain}}) runs-on: ubuntu-latest strategy: fail-fast: false matrix: toolchain: [stable, beta, nightly, 1.24.0] command: - name: Check command: check args: "" - name: Test command: test args: "" - name: Lint command: clippy args: "" include: - toolchain: nightly command: name: Format command: fmt args: -- --check steps: - uses: actions/checkout@v2 - name: ⚡ Cache uses: actions/cache@v2 with: path: | ~/.cargo/registry ~/.cargo/git target key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - uses: actions-rs/toolchain@v1 with: toolchain: ${{ matrix.toolchain }} override: true default: true components: rustfmt, clippy - name: ${{matrix.command.name}} uses: actions-rs/cargo@v1 with: command: ${{matrix.command.command}} args: ${{matrix.command.args}}