Skip to content

Run tests, lint and build on every pull request - #6

Open
davis-brown wants to merge 1 commit into
mainfrom
factory/issue-3
Open

davis-brown wants to merge 1 commit into
mainfrom
factory/issue-3

Conversation

@davis-brown

Copy link
Copy Markdown
Owner

Closes #3

I added a CI workflow that runs on every pull request and on pushes to main. All three jobs' commands pass locally. They haven't run on GitHub yet, so this PR is their first real run.

What changed

  • New .github/workflows/ci.yml, with permissions: contents: read. A new commit on a branch cancels that branch's older run. It has three jobs:
    • backend: Node 22, npm ci, npm test in backend/.
    • frontend: Node 20, npm ci, npm run lint -- --no-fix, npm run build in frontend/.
    • browser: docker compose up --build -d, then waits up to 5 minutes for http://localhost:8080/api/events to give any HTTP response, then runs tests/browser/run.sh. If any step fails, it prints docker compose logs.
    • Both Node jobs use actions/checkout@v4 and actions/setup-node@v4 with the built-in npm cache, pointed at each folder's package-lock.json.
  • README.md: one line saying every pull request runs these checks.
  • deploy-backend.yml, the application code and tests/browser/ are unchanged.

How I verified it

  • backend: npm ci && npm test passes (3 tests).
  • frontend: npm ci && npm run lint -- --no-fix && npm run build reports no lint errors and the build completes. My local Node is 26, not the 20 CI uses, so CI is the real check for the version.
  • browser: I ran the same steps locally under a separate compose project name. The API answered (403 without a login, which counts as "answering"). The five suites I could see in the output all passed: families/groups/members 9/9, group-pdf 1/1, home-page 3/3, login-and-members 10/10, regular-user 13/13. My output was cut off above the families suite, so calendar.check.js's result wasn't shown. The CI run will show it in full. I then took the stack down and removed its volumes.

What to check

  • After pushing, run gh pr checks and confirm all three jobs are green, especially browser and the calendar check in its log.
  • tests/browser/run.sh runs the Playwright container as the runner's user and runs npm ci into tests/browser/ on the checkout. That works locally; it should also work on GitHub's runner, which owns the checkout.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-18T05:23:54.604738Z f2f37de PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Run tests, lint and build on every pull request

1 participant