Files
pipdock/.github/workflows/ci-node.yml
T
poli0981andClaude Opus 5.5 ccae96dbeb chore: move to poli0981org — self-contained CI, Qodana, an npm licence gate, this week's dependencies (#119)
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>
2026-11-21 21:50:41 +07:00

128 lines
4.3 KiB
YAML

# The frontend's checks, all project-local.
#
# Until the move to poli0981org (2026-11-21) the `lint · typecheck · test · build` job was a caller
# into the owner's personal ops repo — `poli0981/.github`'s reusable-web-react.yml, at `@main`,
# unpinned. A project in the organization no longer runs a workflow another account can change, so
# the job's steps live here, pinned like every other action in this repository. Two things went
# with the reusable: the `pages: write` and `id-token: write` grants its always-skipped Pages job
# forced on the caller, and the `dist` artifact nothing downloaded.
#
# package.json still sits at the repository root with Vite's `root: './ui'` (ARCHITECTURE §2). The
# reusable's missing `working-directory` input was the original reason and is gone; SonarCloud,
# Qodana, the scripts below and Tauri's own configuration all assume the root now.
name: CI / Node
on:
pull_request:
push:
branches: [main]
permissions:
contents: read
concurrency:
group: ci-node-${{ github.ref }}
cancel-in-progress: true
jobs:
web:
# A required check under exactly this name (RELEASE-CI.md §2): renaming it means changing the
# branch protection payload in the same breath.
name: lint · typecheck · test · build
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Setup Node.js
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: '26'
cache: npm
# No install script runs: the only package in the lockfile that has one is fsevents, which
# is macOS-only, and a lifecycle script is how a compromised dependency runs on the runner
# (SonarCloud githubactions:S6505). `npm licences` and `npm audit` never needed them either.
- name: Install
run: npm ci --ignore-scripts
- name: Lint
run: npm run lint
- name: Typecheck
run: npm run typecheck
- name: Test
run: npm test
- name: Build
run: npm run build
audit:
name: npm audit
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Setup Node.js
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: '26'
cache: npm
# The audit reads the lockfile; nothing is built, so no install script has a reason to run.
- name: Install
run: npm ci --ignore-scripts
- name: Audit
run: npm audit --audit-level=high
licences:
# The npm half of what deny.toml does for the crates: every package the production build can
# bundle must carry a GPL-3.0-compatible licence (THIRD-PARTY-NOTICES, SECURITY §7). It reads
# package-lock.json and installs nothing.
name: npm licences
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Setup Node.js
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: '26'
# The checker tests itself with Node's built-in runner, so it needs no dependency either.
- name: Test the checker
run: node --test scripts/*.test.mjs
- name: Production dependencies under GPL-3.0-compatible licences
run: node scripts/check-licenses.mjs
lockstep:
name: tauri lockstep
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
# Tauri refuses to run when the `tauri` crate and `@tauri-apps/api` are on different minors,
# and Dependabot bumps the two ecosystems in separate PRs — so either one, merged alone,
# leaves a `main` that builds and does not start. The script reads both lockfiles.
- name: Crate and npm package on one minor
run: node scripts/check-tauri-lockstep.mjs