name: Checks and tests
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
stable:
name: On stable
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v2
- name: Install Rust 1.46
uses: actions-rs/toolchain@v1
with:
toolchain: "1.46.0"
profile: minimal
override: true
components: clippy
- name: Run Clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: "-- -A clippy::unknown_clippy_lints"
env:
RUSTFLAGS: -D warnings
- name: Run tests
uses: actions-rs/cargo@v1
with:
command: test
env:
RUSTFLAGS: -D warnings
nightly:
name: On nightly
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v2
- name: Install latest nightly
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
profile: minimal
override: true
components: clippy
- name: Run Clippy
uses: actions-rs/cargo@v1
with:
command: clippy
env:
RUSTFLAGS: -D warnings
- name: Run tests
uses: actions-rs/cargo@v1
with:
command: test
env:
RUSTFLAGS: -D warnings