mirror of
https://github.com/ratspeak/lrgp-rs
synced 2026-08-12 18:07:21 -04:00
54 lines
1.5 KiB
YAML
54 lines
1.5 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches: [main]
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
quality:
|
|
name: Test and lint
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 20
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
components: clippy, rustfmt
|
|
- uses: Swatinem/rust-cache@v2
|
|
with:
|
|
cache-bin: false
|
|
save-if: ${{ github.ref == 'refs/heads/main' }}
|
|
- name: Check formatting
|
|
run: cargo fmt --all -- --check
|
|
# lrgp-rs is a library and intentionally does not commit Cargo.lock.
|
|
# Keep these commands unlocked so CI matches a fresh consumer checkout.
|
|
- name: Lint all targets
|
|
run: cargo clippy --all-targets --all-features -- -D warnings
|
|
- name: Run tests
|
|
run: cargo test --all-features
|
|
|
|
msrv:
|
|
name: Rust 1.85 MSRV
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 20
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
- uses: dtolnay/rust-toolchain@1.85.0
|
|
with:
|
|
components: clippy
|
|
- uses: Swatinem/rust-cache@v2
|
|
with:
|
|
cache-bin: false
|
|
save-if: ${{ github.ref == 'refs/heads/main' }}
|
|
- name: Clippy (all targets and features)
|
|
run: cargo clippy --all-targets --all-features -- -D warnings
|