name: Rust
on: [push, pull_request]
jobs:
main:
runs-on: ubuntu-latest
strategy:
matrix:
rust: [stable, beta]
steps:
- uses: actions/checkout@v1
- name: configure Rust
run: |
rustup install ${{ matrix.rust }}
rustup default ${{ matrix.rust }}
rustup component add --toolchain ${{ matrix.rust }} rustfmt clippy
- name: clippy
run: cargo clippy -- -Dwarnings
- name: test
run: cargo test
fmt-check:
runs-on: ubuntu-latest
strategy:
matrix:
rust: [stable, beta, nightly]
steps:
- uses: actions/checkout@v1
- name: configure Rust
continue-on-error: true
run: |
rustup install ${{ matrix.rust }}
rustup default ${{ matrix.rust }}
rustup component add --toolchain ${{ matrix.rust }} rustfmt
- name: fmt check
continue-on-error: true
run: cargo fmt -- --check
main-try:
runs-on: ubuntu-latest
strategy:
matrix:
rust: [nightly]
steps:
- uses: actions/checkout@v1
- name: configure Rust
continue-on-error: true
run: |
rustup install ${{ matrix.rust }}
rustup default ${{ matrix.rust }}
rustup component add --toolchain ${{ matrix.rust }} rustfmt clippy
- name: clippy
continue-on-error: true
run: cargo clippy -- -Dwarnings
- name: test
continue-on-error: true
run: cargo test