lprs/.github/workflows/ci.yml

50 lines
1.2 KiB
YAML

name: CI
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
build:
name: Rust build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- run: cargo build --workspace --all-features
rustfmt:
name: Rust format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- run: cargo fmt -- --check
check:
name: Rust check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- run: cargo check --workspace --all-features
clippy:
name: Rust clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- run: cargo clippy --workspace --all-features -- -D warnings
verify_msrv:
name: Verify Minimum Supported Rust Version in Cargo.toml
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install or use cached `cargo-msrv`
uses: baptiste0928/cargo-install@v2
with:
crate: cargo-msrv
- name: Verify Minimum Rust Version
run: cargo-msrv verify