ci: fix broken workflow YAML, add unit tests, make CI a required check #44

Closed
Mark wants to merge 3 commits from ci/required-checks into main
Owner

Summary

Fixes the CI pipeline on Mark/nodedesk so merge is blocked when any test fails.

What was broken

.forgejo/workflows/ci.yml was invalid YAML: the Type check step was indented at column 0 (line 40), so every Actions run failed at parse time (Failing after 0s). Hundreds of runs in history show this.

Changes

  1. Repaired the broken YAML — Type check step is now a proper step of the quality job.
  2. Added the unit-test gate — new Unit tests step runs npm run test:unit (vitest). This covers unit + integration tests (*.integration.test.ts self-skip without S3 env). Previously only lint + build + e2e ran; the card requires unit, integration, and lint all gating.
  3. Locked install — npm ci is used (repo has package-lock.json; no pnpm lockfile exists, so pnpm install --frozen-lockfile does not apply. npm ci is the frozen-lockfile equivalent).

Required checks (wired via branch protection on main)

After this PR is green, branch protection will require:

  • CI / quality (pull_request)
  • CI / e2e (pull_request)

Verification

  • A deliberate broken-test commit will be pushed to this branch, CI will fail, and the commit will be reverted (see run history).
## Summary Fixes the CI pipeline on Mark/nodedesk so merge is blocked when any test fails. ### What was broken `.forgejo/workflows/ci.yml` was **invalid YAML**: the `Type check` step was indented at column 0 (line 40), so every Actions run failed at parse time (`Failing after 0s`). Hundreds of runs in history show this. ### Changes 1. **Repaired the broken YAML** — Type check step is now a proper step of the `quality` job. 2. **Added the unit-test gate** — new `Unit tests` step runs `npm run test:unit` (vitest). This covers unit + integration tests (`*.integration.test.ts` self-skip without S3 env). Previously only lint + build + e2e ran; the card requires unit, integration, and lint all gating. 3. **Locked install** — `npm ci` is used (repo has `package-lock.json`; no pnpm lockfile exists, so `pnpm install --frozen-lockfile` does not apply. `npm ci` is the frozen-lockfile equivalent). ### Required checks (wired via branch protection on `main`) After this PR is green, branch protection will require: - `CI / quality (pull_request)` - `CI / e2e (pull_request)` ### Verification - A deliberate broken-test commit will be pushed to this branch, CI will fail, and the commit will be reverted (see run history).
ci: fix broken workflow YAML, add unit tests to required checks
Some checks failed
CI / quality (pull_request) Failing after 1m2s
CI / e2e (pull_request) Has been skipped
9d1e16f205
- Repair mis-indented Type check step that made ci.yml invalid YAML
  (every Actions run was failing at parse time)
- Add Unit tests step (vitest) so lint, typecheck, unit + integration
  tests all gate the quality job
- npm ci is the frozen-lockfile install for this repo (package-lock.json);
  pnpm lockfile does not exist
test: add vitest devDependency so unit tests and typecheck can run in CI
Some checks failed
CI / quality (pull_request) Successful in 1m21s
CI / e2e (pull_request) Failing after 49s
93e51b11d0
The test suite imports from 'vitest' but the package was never declared,
so 'npm run typecheck' failed (TS2307) and 'npm run test:unit' could not
run at all. Adds vitest ^4.1.10.
ci(e2e): reach postgres service via localhost on host-networked runner
Some checks failed
CI / quality (pull_request) Successful in 1m21s
CI / e2e (pull_request) Failing after 51s
51ac43fedd
The runner runs job containers with container.network: host, so the
service hostname 'postgres' does not resolve and prisma db push fails
with P1001. The postgres service container binds the host network, so
localhost:5432 reaches it. Also fixes the redacted password to match
the service definition (test).
Author
Owner

Superseded by PR #45 (ci/quality-gates-matrix). That PR contains this YAML fix plus the full matrix quality-gate workflow: separate lint/typecheck/unit/build jobs, Node 20+22 matrix, npm caching, junit.xml + build artifacts, and the e2e job split into its own workflow file. Closing this one to keep the open-PR state clean.

Superseded by PR #45 (ci/quality-gates-matrix). That PR contains this YAML fix plus the full matrix quality-gate workflow: separate lint/typecheck/unit/build jobs, Node 20+22 matrix, npm caching, junit.xml + build artifacts, and the e2e job split into its own workflow file. Closing this one to keep the open-PR state clean.
Mark closed this pull request 2026-07-31 06:34:35 +00:00
Some checks failed
CI / quality (pull_request) Successful in 1m21s
CI / e2e (pull_request) Failing after 51s

Pull request closed

Sign in to join this conversation.
No description provided.