name: CI
on:
push:
branches:
- master
- boilerplate
pull_request:
env:
CARGO_TERM_COLOR: always
jobs:
check:
name: Test, Clippy, Fmt, Checkers
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- name: Install nightly rustfmt
run: rustup toolchain install nightly --profile minimal --component rustfmt
- uses: Swatinem/rust-cache@v2
- name: cargo test
run: cargo test --locked
- name: cargo clippy
run: cargo clippy --all-targets --locked -- -D warnings
- name: cargo build (test-doomgram example)
run: cargo build --examples --features test-doomgram --locked
- name: cargo doc
run: cargo doc --no-deps --locked
- name: rustfmt
run: ./scripts/fmt --check
- name: DOC_76 checker
run: python3 scripts/check_doc_76.py
- name: RUST_TEST_NAMING checker
run: python3 scripts/check_test_names.py
- name: DERIVE_LAYOUT checker
run: python3 scripts/check_derives.py
msrv:
name: MSRV (1.74)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@1.74.0
- uses: Swatinem/rust-cache@v2
- name: cargo check (library)
run: cargo check --lib --locked