mirror of
https://github.com/anthonyoteri/dredge.git
synced 2026-06-05 15:26:53 -04:00
d37ca2de44
- cargo deny: add MPL-2.0 and BSD-3-Clause to allow list (colored via simple_logger/mockito; encoding_rs via reqwest) - conventional commits: use explicit SHA of last pre-conventional commit instead of from_latest_tag (no tags exist yet in the repo) - MSRV: raise rust-version 1.80 -> 1.88 to match the actual minimum required by the dependency tree (simple_logger -> time 0.3 -> 1.88) - MSRV CI: update toolchain pin to 1.88 to match - macOS test: remove Swatinem/rust-cache from test matrix job to avoid stale cache corrupting the cargo binary path on arm64 runners
100 lines
2.1 KiB
YAML
100 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: 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 since conventional commits were adopted.
|
|
# 9b602f7 is the last commit before the first conventional commit.
|
|
from: 9b602f70a60e5651771ae40a934a7d417d9e1214
|
|
|
|
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.88)
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Install Rust 1.88
|
|
uses: dtolnay/rust-toolchain@1.88
|
|
|
|
- name: Cache dependencies
|
|
uses: Swatinem/rust-cache@v2
|
|
|
|
- name: Check MSRV builds
|
|
run: cargo check
|
|
|
|
|