name: Rust
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
check-style:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
- name: Report cargo version
run: cargo --version
- name: Report rustfmt version
run: cargo fmt -- --version
- name: Check style
run: cargo fmt -- --check
clippy-lint:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
- name: Report cargo version
run: cargo --version
- name: Report Clippy version
run: cargo clippy -- --version
- name: Run Clippy Lints
run: cargo clippy --all-targets -- --deny warnings --allow clippy::style
build-and-test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-20.04, windows-2022, macos-12 ]
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
- uses: actions-rs/toolchain@88dc2356392166efad76775c878094f4e83ff746
with:
profile: minimal
toolchain: stable
override: true
- name: Report cargo version
run: cargo --version
- name: Build
run: cargo build --tests --verbose
- name: Run tests
run: cargo test --verbose