The first SonarQube Cloud scan reported 57 issues. 45 are fixed in code, the 11 on the saved itch.io test pages leave the scan via .sonarcloud.properties, and css:S8776 (Tailwind's @utility nesting) is a false positive to mark on SonarQube Cloud. Worker: trailing slashes and the gate cookie's padding are trimmed by trimEnd() instead of /\/+$/ (quadratic on the public 404 path); the feed and collection parsers lose their backtracking regexes; compareCodeUnits keeps the code-unit sorts (the rule's localeCompare is locale-dependent); Number.*, DEFAULT_SIZES, crypto.randomUUID; i18n-edit.mjs reads stdin. Pipeline: the NSFW notices are one selector list, either class (the rule's ".a.b" would need both), each tested; plain if-guards; update_info.main returns None; no plain-http adapter; [[ ]] in cf_build_status.sh. Supply chain: requirements*.txt are hash-locked pip-tools compiles of requirements*.in (on Python 3.14, which Dependabot reads from the header), installed with --require-hashes --only-binary :all: in block scalars; npm ci --ignore-scripts in CI and the release builds (verified by manual release runs on all platforms); npm run cf:check. Release 4.4.2: also ships the toolchain upgrade (#149, #154) and Dependabot #141-#148, #150, #152, #153. CLAUDE.md gotchas 40 and 41. [skip-discuss] Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
67 lines
1.8 KiB
YAML
67 lines
1.8 KiB
YAML
# Checks the web app on pull requests. Deployment is NOT done here —
|
|
# Cloudflare Workers Builds deploys main from webapp/wrangler.jsonc.
|
|
name: Webapp CI
|
|
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- 'webapp/**'
|
|
- '.github/workflows/webapp-ci.yml'
|
|
|
|
permissions: {}
|
|
|
|
concurrency:
|
|
group: webapp-ci-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
check:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 15
|
|
permissions:
|
|
contents: read
|
|
defaults:
|
|
run:
|
|
working-directory: webapp
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: Set up Node.js
|
|
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
|
|
with:
|
|
node-version-file: webapp/.node-version
|
|
cache: npm
|
|
cache-dependency-path: webapp/package-lock.json
|
|
|
|
# No install scripts: esbuild's and workerd's postinstall only check their
|
|
# platform binary, which their launchers find without it.
|
|
- name: Install dependencies
|
|
run: npm ci --ignore-scripts
|
|
|
|
# The web build never runs `tauri build`, which refuses mismatched
|
|
# crate / npm versions; without this a Dependabot bump on one side
|
|
# surfaces only when the release workflows run on a tag.
|
|
- name: Tauri crates match their npm packages
|
|
run: npm run check:tauri
|
|
|
|
- name: Worker types are up to date
|
|
run: npm run cf:types -- --check
|
|
|
|
- name: Lint
|
|
run: npm run lint
|
|
|
|
- name: Unused code (knip)
|
|
run: npm run knip
|
|
|
|
- name: Unit tests (Worker, app; D1 tests run a local workerd)
|
|
run: npm test
|
|
|
|
- name: Type-check and build
|
|
run: npm run build
|
|
|
|
- name: Validate Workers config (dry run)
|
|
run: npm run cf:check
|