The repository now lives in the poli0981org organization, and this makes it at home there. - main was red since 2026-11-18: RUSTSEC-2026-0543 (chrono), in Cargo.lock only through serde_with's weak features and compiled into nothing; ignored with its reason and exit condition. - Supersedes #113–#118 (Rust 1.100.0, rusqlite 0.42.0, Tauri 2.12.6, code-health pins, actions, npm) plus jsdom 31.0.1; minimatch 11 closes GHSA-g3hv-75wg-m249. rfd 0.18 (#112) is held again until tauri-plugin-dialog moves. - Dependabot's tauri groups never worked (it picks the most specific group); exclude-patterns on the catch-alls fix it. - CI is self-contained: no workflow calls poli0981/.github; every action is pinned by commit; notify.yml vendors the Discord notifier. - npm licences: scripts/check-licenses.mjs, deny.toml's allowlist for the npm half. Required, with cargo deny and tauri lockstep — eight required checks. - Qodana in two parts (Rust, TS/JS), full scans, a triaged Rust baseline, fail on anything new. The Rust container needed its toolchain and CARGO_HOME pointed somewhere writable before it analysed anything. - SonarQube Cloud analyses into poli0981org_pipdock; every npm ci runs with --ignore-scripts (S6505). - Every repository URL points at the organization. README's attestation command for 1.4.0/1.5.0 had stopped working; it now says --owner poli0981 --signer-repo poli0981/pipdock. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
110 lines
3.5 KiB
YAML
110 lines
3.5 KiB
YAML
# Project-local, like every workflow here since the move to poli0981org (RELEASE-CI.md §1).
|
|
#
|
|
# Windows runner because the environment-discovery module reads the PEP 514 registry and the `py`
|
|
# launcher — a Linux run would skip exactly the code most likely to break.
|
|
|
|
name: CI / Rust
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches: [main]
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: ci-rust-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
RUSTFLAGS: -D warnings
|
|
|
|
jobs:
|
|
check:
|
|
name: fmt · clippy · test
|
|
runs-on: windows-latest
|
|
timeout-minutes: 45
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
persist-credentials: false
|
|
|
|
# rust-toolchain.toml pins the exact version, so no toolchain action is needed — rustup
|
|
# honours it on first invocation and installs rustfmt and clippy with it.
|
|
- name: Show toolchain
|
|
run: |
|
|
rustup show
|
|
cargo --version
|
|
|
|
- name: Cache cargo
|
|
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
|
|
with:
|
|
path: |
|
|
~/.cargo/registry
|
|
~/.cargo/git
|
|
target
|
|
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock', 'rust-toolchain.toml') }}
|
|
restore-keys: ${{ runner.os }}-cargo-
|
|
|
|
- name: Format
|
|
run: cargo fmt --all -- --check
|
|
|
|
- name: Clippy
|
|
run: cargo clippy --workspace --all-targets --locked -- -D warnings
|
|
|
|
- name: Test
|
|
run: cargo test --workspace --locked
|
|
|
|
audit:
|
|
name: cargo audit
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 15
|
|
env:
|
|
# cargo-audit only reads Cargo.lock, so it runs under the runner's stable cargo rather than
|
|
# making rustup install the toolchain rust-toolchain.toml pins — that pin exists to make
|
|
# PipDock reproducible, not its tooling.
|
|
RUSTUP_TOOLCHAIN: stable
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
persist-credentials: false
|
|
|
|
# A prebuilt cargo-audit, pinned by commit. This replaced rustsec/audit-check@v2, which ran
|
|
# on Node 20, needed a check-run write token, and on a pull request failed only on
|
|
# "critical" — so the advisories that turned `main` red in September passed every PR.
|
|
- name: Install cargo-audit
|
|
uses: taiki-e/install-action@4a76afe23f9e08d2d9550fb56e556444e8611d21 # v2.90.4
|
|
with:
|
|
tool: cargo-audit
|
|
|
|
# RustSec advisories against the committed Cargo.lock. `--deny warnings`, because
|
|
# .cargo/audit.toml's contract is that a *new* informational advisory fails CI and is looked
|
|
# at; the known ones are ignored there one by one, with reasons.
|
|
- name: Audit
|
|
run: cargo audit --deny warnings
|
|
|
|
deny:
|
|
name: cargo deny
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 15
|
|
env:
|
|
RUSTUP_TOOLCHAIN: stable
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: Install cargo-deny
|
|
uses: taiki-e/install-action@4a76afe23f9e08d2d9550fb56e556444e8611d21 # v2.90.4
|
|
with:
|
|
tool: cargo-deny
|
|
|
|
# Licences, sources and bans — deny.toml says why each. Advisories stay cargo audit's.
|
|
- name: Licences, sources, bans
|
|
run: cargo deny --locked check licenses sources bans
|