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.42.0] command: - name: Check command: check args: "" components: "" - name: Test command: test args: "" components: "" include: - toolchain: nightly command: name: Format command: fmt args: -- --check components: rustfmt - toolchain: stable command: name: Lint command: clippy args: "" components: clippy 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: ${{matrix.command.components}} - name: ${{matrix.command.name}} uses: actions-rs/cargo@v1 with: command: ${{matrix.command.command}} args: ${{matrix.command.args}}