Add frontend testing #27
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
There are tests on the frontend. Can you add a step for running these tests on another gitea workflow? Make that each branch does these tests not only master
Let me check the runner docs for the default image used by the
dockerlabel, and test what the suite needs locally.Now let me verify the Node LTS tarball URL I plan to use for the runner exists (in case the runner's default image lacks a modern node):
Now I'll create the test workflow, following the conventions of
deploy.yml:Now update the project map in
AGENTS.mdthat describes CI, and validate the workflow YAML and the exact commands the CI will run:YAML is valid and the trigger fires on every branch. Now verify the setup script works in both shells and run the suite exactly as CI will:
Everything checks out. Final review of the new workflow file:
Done. The issue asked for the existing tests to run in Gitea CI on every branch, not just
master.What I found: the "frontend tests" are the root
tests/suite (npm test→node --test tests/), which covers the frontend (sidebar-entity-entry.test.js,map-viewer.test.jsreadfrontend/app/...directly) plus the Foundry module tests. It runs with no installed dependencies and only needs Node 18+. The only workflow wasdeploy.yml, restricted topushonmaster.Changes:
.gitea/workflows/test.yml(new) — a separate workflow from deploy, triggered onpushto any branch (branches: ['**']), running on the samedockerrunner the deploy workflow uses:actions/checkout@v4(same as deploy).apt-getstyle, and the tarball URL was verified to return 200).npm testfrom the repo root.AGENTS.md— extended the CI paragraph in §1 to mention the new test workflow.Verified locally:
npm testpasses: 34 tests, 0 failures (Node v20.20.2).push/branches: ['**']trigger and three steps.bashandsh: keeps an existing Node ≥ 18 and takes the install branch when Node is absent.Nothing was committed; the automation will handle that.
Implementation is ready for review: #28
The automated implementation stopped because of an internal error. Please check the worker logs for details.