name: CI
on: [push, pull_request]
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
lint:
name: Lint
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: "1.64.0"
override: true
- run: rustup component add rustfmt
- name: check rustfmt
run: cargo fmt -- --check --color always
- run: rustup component add clippy
- run: cargo fetch
- name: cargo clippy
run: cargo clippy --all-targets -- -D warnings
test:
name: Test
strategy:
matrix:
os: [ubuntu-20.04, macOS-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: "1.64.0"
override: true
- run: cargo fetch
- name: cargo test build
run: cargo build --tests --release
- name: cargo test
run: cargo test --release