expressive/.github/workflows/ci.yml
Sebastian Schmidt 27ce5300a7 Fix yaml syntax.
2021-06-02 17:30:43 +03:00

59 lines
1.5 KiB
YAML

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.26.0, 1.27.0, 1.28.0, 1.29.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}}