mirror of
https://github.com/sudosylabs/vnidrop.git
synced 2026-08-05 18:39:55 +02:00
Limit push triggers to master so PR branch updates only run once via pull_request, and cancel superseded in-progress runs with concurrency groups.
46 lines
1.2 KiB
YAML
46 lines
1.2 KiB
YAML
name: Rust core
|
|
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- "Cargo.toml"
|
|
- "Cargo.lock"
|
|
- "crates/vnidrop/**"
|
|
- ".github/workflows/rust-core.yml"
|
|
push:
|
|
# Only after merge (or direct master pushes). Feature-branch work is covered
|
|
# by pull_request so we do not run the same job twice on every PR update.
|
|
branches:
|
|
- master
|
|
paths:
|
|
- "Cargo.toml"
|
|
- "Cargo.lock"
|
|
- "crates/vnidrop/**"
|
|
- ".github/workflows/rust-core.yml"
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: rust-core-${{ github.event.pull_request.number || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
quality:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 30
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Install Rust quality components
|
|
run: rustup component add clippy rustfmt
|
|
- name: Check formatting
|
|
run: cargo fmt --all -- --check
|
|
- name: Run strict Clippy
|
|
run: cargo clippy --workspace --all-targets -- -D warnings
|
|
- name: Run unit and integration tests
|
|
run: cargo test --workspace --all-targets
|
|
- name: Check documentation
|
|
env:
|
|
RUSTDOCFLAGS: -D warnings
|
|
run: cargo doc --workspace --no-deps
|