ci(#58): verify green workflows, add CI-green item to PR template #59

Merged
Mark merged 4 commits from ci/verify-green-workflows into main 2026-08-14 00:00:11 +00:00
Owner

Summary

CI verification PR for the workflow changes from nodedesk#58 (SHA-pinned GitHub + Forgejo Actions workflows). This PR:

  1. Carries the workflow files (already on main via d23b26a + 5b12d31)
  2. Adds the CI-green checklist item to the PR template (.gitea/PULL_REQUEST_TEMPLATE.md)
  3. Fixes three bugs found while verifying the workflows on the Forgejo runner:
    • Dummy STRIPE_* env vars broke env.test.ts (isStripeConfigured returned true when the test expects false)
    • Coverage-summary step used a PCRE2-illegal variable-length lookbehind in grep -oP
    • Coverage-comment step assumed GitHub runner env (GITHUB_API_URL → codeberg.org 404) and required jq (absent from the job image); now fail-open + pure-node

Linked issues

Closes #

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation / chore (no production behavior change)

CI status

CI run: https://forgejo.tail018ac4.ts.net/Mark/nodedesk/actions/runs/5505 — green (head e7eed37)

  • CI green — latest Actions run for this branch
  • .forgejo/workflows/ci.yml is green for this branch
  • Lint passes (npm run lint)
  • Type check passes (npm run typecheck)
  • Unit tests pass on Node 20 and Node 22 (npm run test:unit)

CI jobs (for reference)

Job Purpose
Lint eslint . --max-warnings=0 — style + rule enforcement
Type check tsc --noEmit — verify the TypeScript surface compiles
Unit tests (Node 20 / 22) vitest run — fast, deterministic, mocked unit suite on both supported runtimes
Integration Real Postgres + S3 surfaces; self-skips until runner-side services exist (advisory)
Coverage Vitest --coverage with lines >= 18% floor; lcov + cobertura artifacts; posts a PR comment
Build next build — catches SSR / route-level regressions that lint + unit miss (merge gate)
E2E Playwright end-to-end suite — separate workflow, push + workflow_dispatch only (deferred)

Checklist

  • I have read CONTRIBUTING.md
  • I have added or updated tests for behavior changes
  • I have run npm run lint and npm run typecheck locally
  • I have not introduced new lint or typecheck warnings
  • If user-facing, I have updated docs / comments accordingly

Risks & rollback

No production behavior change. Revert by reverting the workflow + template changes; the workflow files were already merged on main (the fixes in this PR are what make them actually green).

## Summary CI verification PR for the workflow changes from nodedesk#58 (SHA-pinned GitHub + Forgejo Actions workflows). This PR: 1. Carries the workflow files (already on main via d23b26a + 5b12d31) 2. Adds the CI-green checklist item to the PR template (`.gitea/PULL_REQUEST_TEMPLATE.md`) 3. Fixes three bugs found while verifying the workflows on the Forgejo runner: - Dummy `STRIPE_*` env vars broke `env.test.ts` (`isStripeConfigured` returned true when the test expects false) - Coverage-summary step used a PCRE2-illegal variable-length lookbehind in `grep -oP` - Coverage-comment step assumed GitHub runner env (`GITHUB_API_URL` → codeberg.org 404) and required `jq` (absent from the job image); now fail-open + pure-node ## Linked issues Closes #<!-- issue number --> ## Type of change - [ ] Bug fix (non-breaking change that fixes an issue) - [ ] New feature (non-breaking change that adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [x] Documentation / chore (no production behavior change) ## CI status CI run: https://forgejo.tail018ac4.ts.net/Mark/nodedesk/actions/runs/5505 — **green** (head e7eed37) - [x] CI green — [latest Actions run](https://forgejo.tail018ac4.ts.net/Mark/nodedesk/actions) for this branch - [x] `.forgejo/workflows/ci.yml` is green for this branch - [x] Lint passes (`npm run lint`) - [x] Type check passes (`npm run typecheck`) - [x] Unit tests pass on Node 20 and Node 22 (`npm run test:unit`) ## CI jobs (for reference) | Job | Purpose | | --- | --- | | Lint | `eslint . --max-warnings=0` — style + rule enforcement | | Type check | `tsc --noEmit` — verify the TypeScript surface compiles | | Unit tests (Node 20 / 22) | `vitest run` — fast, deterministic, mocked unit suite on both supported runtimes | | Integration | Real Postgres + S3 surfaces; self-skips until runner-side services exist (advisory) | | Coverage | Vitest `--coverage` with lines >= 18% floor; lcov + cobertura artifacts; posts a PR comment | | Build | `next build` — catches SSR / route-level regressions that lint + unit miss (merge gate) | | E2E | Playwright end-to-end suite — separate workflow, push + workflow_dispatch only (deferred) | ## Checklist - [x] I have read `CONTRIBUTING.md` - [ ] I have added or updated tests for behavior changes - [ ] I have run `npm run lint` and `npm run typecheck` locally - [x] I have not introduced new lint or typecheck warnings - [ ] If user-facing, I have updated docs / comments accordingly ## Risks & rollback No production behavior change. Revert by reverting the workflow + template changes; the workflow files were already merged on main (the fixes in this PR are what make them actually green).
ci(#58): add CI-green checklist item to PR template, point at .forgejo workflow
Some checks failed
CI / Lint (pull_request) Successful in 4m28s
CI / Type check (pull_request) Successful in 3m24s
CI / Unit tests (Node 20) (pull_request) Failing after 3m56s
CI / Unit tests (Node 22) (pull_request) Failing after 3m42s
CI / Integration (pull_request) Has been skipped
CI / Coverage (pull_request) Has been skipped
CI / Build (pull_request) Has been skipped
a42dcfb693
ci(#58): drop dummy STRIPE_* env from workflows — breaks isStripeConfigured unit test
Some checks failed
CI / Lint (pull_request) Successful in 3m34s
CI / Type check (pull_request) Successful in 3m40s
CI / Unit tests (Node 20) (pull_request) Successful in 3m49s
CI / Unit tests (Node 22) (pull_request) Successful in 3m48s
CI / Integration (pull_request) Successful in 3m47s
CI / Coverage (pull_request) Failing after 5m7s
CI / Build (pull_request) Has been skipped
4191d0cab0
The job-level env block set STRIPE_SECRET_KEY/WEBHOOK_SECRET/PRICE_IDs to
dummy values. Those vars are optional in src/lib/env.ts, but setting them
makes isStripeConfigured() return true, failing env.test.ts 'returns false
when stripe vars are missing'. Remove them from both the Forgejo and GitHub
workflow variants.
ci(#58): fix coverage summary grep — PCRE2 rejects variable-length lookbehind
Some checks failed
CI / Lint (pull_request) Successful in 3m27s
CI / Type check (pull_request) Successful in 3m25s
CI / Unit tests (Node 20) (pull_request) Successful in 3m46s
CI / Unit tests (Node 22) (pull_request) Successful in 3m46s
CI / Integration (pull_request) Successful in 3m43s
CI / Coverage (pull_request) Failing after 5m18s
CI / Build (pull_request) Has been skipped
9437a3bfac
The 'Build coverage summary' step used grep -oP '(?<=<class [^>]*filename=")...'
which fails on PCRE2 ('lookbehind assertion is not fixed length'), killing the
Coverage job under set -e. Use \K reset matches, which are PCRE2-legal and
produce the same match sequence.
ci(#58): make coverage comment step fail-open for Forgejo runner
All checks were successful
CI / Lint (pull_request) Successful in 53s
CI / Unit tests (Node 20) (pull_request) Successful in 1m25s
CI / Unit tests (Node 22) (pull_request) Successful in 2m8s
CI / Type check (pull_request) Successful in 3m35s
CI / Integration (pull_request) Successful in 49s
CI / Coverage (pull_request) Successful in 56s
CI / Build (pull_request) Successful in 3m49s
e7eed37b84
The 'Post coverage comment to PR' step assumed GitHub runner env
(GITHUB_API_URL defaults to codeberg.org → 404 on this instance) and
required jq, which is not installed in the node:20-bookworm job image.
Forgejo runner v6.2.2 populates neither GITHUB_API_URL nor GITHUB_TOKEN
the way GitHub does. Rewrite the step to:
- resolve the API base from GITHUB_SERVER_URL with a Forgejo-host fallback
- use pure-node JSON building instead of jq
- skip cleanly when GH_TOKEN/PR number are absent (coverage gate is the
  vitest 18% floor, not this comment)
Mark merged commit 3ff57848d5 into main 2026-08-14 00:00:11 +00:00
Sign in to join this conversation.
No description provided.