mirror of
https://github.com/anthonyoteri/dredge.git
synced 2026-06-05 15:26:53 -04:00
bfd0598684
- Replace serde_yml with serde_norway (RUSTSEC-2025-0068: serde_yml is unsound and archived; serde_norway is the recommended maintained fork) - Remove unused toml dependency (was resolving to v1.1.2 which requires edition2024/Rust 1.85, breaking the MSRV 1.80 check) - Run cargo fmt to fix formatting diffs caught by lint job - Fix cog commit check to use from_latest_tag so pre-conventional-commits history does not cause the check to fail - Remove semver job: dredge is a binary-only crate with no lib target, cargo-semver-checks cannot check it
103 lines
2.1 KiB
YAML
103 lines
2.1 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: ["master"]
|
|
pull_request:
|
|
workflow_call:
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
RUSTFLAGS: "-D warnings"
|
|
|
|
jobs:
|
|
test:
|
|
name: Test (${{ matrix.os }})
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Install stable toolchain
|
|
uses: dtolnay/rust-toolchain@stable
|
|
|
|
- name: Cache dependencies
|
|
uses: Swatinem/rust-cache@v2
|
|
|
|
- name: Build
|
|
run: cargo build --all-targets
|
|
|
|
- name: Run tests
|
|
run: cargo test
|
|
|
|
lint:
|
|
name: Lint
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Install stable toolchain with clippy and rustfmt
|
|
uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
components: clippy, rustfmt
|
|
|
|
- name: Cache dependencies
|
|
uses: Swatinem/rust-cache@v2
|
|
|
|
- name: Check formatting
|
|
run: cargo fmt --check --all
|
|
|
|
- name: Clippy
|
|
run: cargo clippy --all-targets -- -W clippy::pedantic
|
|
|
|
commits:
|
|
name: Conventional commits
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
# Full history is required for cog check to validate all commits.
|
|
fetch-depth: 0
|
|
|
|
- name: Check conventional commits
|
|
uses: cocogitto/cocogitto-action@v3
|
|
with:
|
|
check: true
|
|
# Only check commits reachable from the latest tag so that old
|
|
# non-conventional commits in history do not fail the check.
|
|
from_latest_tag: true
|
|
|
|
deny:
|
|
name: Cargo deny
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Check licenses, advisories, and bans
|
|
uses: EmbarkStudios/cargo-deny-action@v2
|
|
|
|
msrv:
|
|
name: MSRV (1.80)
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Install Rust 1.80
|
|
uses: dtolnay/rust-toolchain@1.80
|
|
|
|
- name: Cache dependencies
|
|
uses: Swatinem/rust-cache@v2
|
|
|
|
- name: Check MSRV builds
|
|
run: cargo check
|
|
|
|
|