name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
CARGO_TERM_COLOR: always
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: rustfmt, clippy
- name: Lint
run: cargo clippy -- -Dclippy::all -Dclippy::pedantic
check-windows:
name: Check (Windows)
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Check
run: cargo check
check-linux:
name: Check (Linux)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Check
run: cargo check
build:
name: Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build
run: cargo build --verbose
- name: Test
run: cargo test --verbose
nightly:
name: Nightly Toolchain
runs-on: ubuntu-latest
strategy:
fail-fast: true
steps:
- uses: actions/checkout@v2
- name: Install nightly toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
components: rustfmt, clippy
- name: Run cargo check
run: cargo check
- name: Run cargo build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
- name: Linting
run: cargo clippy -- -Dclippy::all -Dclippy::pedantic