Files
free-steam-games-list/.github/workflows/web-ci.yml
T
poli0981andClaude Opus 5.5 d057e3f620 fix(deps): patch the open advisories in npm, cargo and pip; Node 24 actions
npm (web/):
- undici 7.30.1 through a "miniflare" override (GHSA-xjj6-f33q-929c,
  GHSA-4qv8-2p9j-2685, GHSA-f72v-6w45-q472). miniflare pins undici exactly
  and wrangler 4.152.0, the newest, still ships 7.29.1. Local tooling only.
- zod 4.6.7 (GHSA-mrhx-c7xc-m3w5, via knip).
- Minor/patch: @lucide/svelte 1.61.0, @tanstack/svelte-virtual 3.13.48,
  bits-ui 2.20.2, vite 8.3.5, wrangler 4.152.0, knip 6.43.0,
  @tauri-apps/cli 2.12.4.

cargo (web/src-tauri/Cargo.lock, targeted updates only):
- rustls 0.23.46 (RUSTSEC-2026-0346..0349), rustls-webpki 0.103.16
  (RUSTSEC-2026-0382), webpki-root-certs 1.0.11 (RUSTSEC-2026-0383),
  tokio 1.54.1 (RUSTSEC-2026-0386), anyhow 1.0.104 (RUSTSEC-2026-0190),
  event-listener 5.4.2 (RUSTSEC-2026-0221), plist 1.10.3 -> quick-xml
  0.42.0 (RUSTSEC-2026-0194/0195). Dependabot had none of these.
- Left upstream: zip 4 (tauri-plugin-updater 2.14.0 asks for ^4), glib 0.18
  (GTK 3), unmaintained proc-macro-error/zbus_names/zvariant.

pip: certifi 2026.10.23, coverage 7.17.0 (tests), with every file's hash.

CI: actions/checkout v4/v5 -> v6 and actions/setup-python v5 -> v6
everywhere (the Node 20 majors warned on every data job), rust-cache 2.9.3
by SHA. dependabot.yml says why those majors are taken by hand.

CLAUDE.md: the undici override and when to drop it; why SvelteKit stays on 2
(GHSA-27mw-82g8-phjj and GHSA-pfhg-q3qv-9q6r need setHeaders or use:enhance,
which the app does not have).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 13:50:58 +07:00

121 lines
4.6 KiB
YAML

name: Web CI
# The check gate for web/. This exists because deploy-pages.yml was previously
# the ONLY thing running `npm run typecheck` — so when that workflow is deleted
# during the Cloudflare migration, nothing would validate the frontend at all.
# Cloudflare Workers Builds deploys the site; this workflow only *checks* it.
# Workflow and Sonar changes run it too: web/shared/pipeline.test.ts and
# web/shared/toolchain.test.ts read .github/workflows/ (the data-write group, the
# Node and Python pins) and sonar-project.properties, and a pull request that
# touches only those files is exactly the one that can break them.
on:
pull_request:
paths: ['web/**', '.github/workflows/**', 'sonar-project.properties']
push:
branches: [main]
paths: ['web/**', '.github/workflows/**', 'sonar-project.properties']
workflow_dispatch:
permissions:
contents: read
concurrency:
group: web-ci-${{ github.ref }}
cancel-in-progress: true
jobs:
check:
runs-on: ubuntu-latest
defaults:
run:
working-directory: web
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v7
with:
node-version: '26'
cache: 'npm'
cache-dependency-path: web/package-lock.json
# Deliberately NOT `npm ci || npm install`. That fallback is what hid the
# echarts/echarts-wordcloud peer conflict: `npm ci` failed, `npm install`
# was tried, and the step still went red only at the very end — while
# locally everyone kept a stale node_modules. A lockfile that cannot be
# installed cleanly is a failure, not something to work around.
#
# --ignore-scripts everywhere this repo runs `npm ci`: a dependency's
# install script would otherwise run with this job's token (and, in the
# release workflows, the signing keys). Three packages have one, and none
# is needed: esbuild (wrangler's) and workerd only hard-link the binary
# from their @esbuild/* and @cloudflare/workerd-* optional packages, which
# they also find without it, and fsevents is macOS file watching, which
# no build uses. The root package.json has no lifecycle scripts.
- name: Install
run: npm ci --ignore-scripts
# Covers BOTH tsconfigs. tsconfig.json only includes ["src",
# "vite.config.ts"], so before tsconfig.worker.json existed the Worker
# source would have shipped completely untyped.
- name: Type check
run: npm run typecheck
# Before the build, so a broken guard or a formatting drift in the
# override serialiser fails fast rather than after a full bundle.
- name: Test
run: npm test
- name: Build
run: npm run build
# Reads the prerendered HTML. The bugs it looks for - an unfilled
# placeholder in a meta description, a count baked in as "0", an empty
# state or the consent dialog shipped as page content - are invisible in
# dev and in unit tests, because they only exist when a page is rendered
# with no browser, no storage and no data.
- name: Verify prerendered output
run: node scripts/verify-dist.mjs --web
# Bundles the Worker and resolves every binding in wrangler.jsonc without
# deploying or needing credentials. Catches a broken config here rather
# than in the Cloudflare dashboard after a push. Through the npm script,
# not `npx`, which may fetch a package that is not in the lockfile.
- name: Worker build check
run: npm run cf:check
# knip.json is warn-only, so this reports dead code without failing the
# build. Flip the rules in knip.json to error when the backlog is clear.
- name: Unused code report
run: npm run knip
# The packaged apps are built from the same source with a different
# configuration (TAURI_ENV_PLATFORM): their own CSP flavour, no service
# worker, no manifest, no prerendered game pages. Nothing checked that build
# before a release tag, so a mistake in it surfaced only in a draft release.
# This builds the web half of it - no Rust toolchain needed - and verifies it.
tauri-flavour:
runs-on: ubuntu-latest
defaults:
run:
working-directory: web
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v7
with:
node-version: '26'
cache: 'npm'
cache-dependency-path: web/package-lock.json
- name: Install
run: npm ci --ignore-scripts
- name: Build (Tauri configuration)
env:
TAURI_ENV_PLATFORM: linux
run: npm run build:desktop
- name: Verify packaged-app output
run: node scripts/verify-dist.mjs --tauri