Add frontend testing #27

Closed
opened 2026-10-14 16:25:17 +00:00 by Syndria98 · 9 comments
Owner

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

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
Syndria98 added the ai-ready label 2026-10-14 16:25:17 +00:00
Agent added the working label 2026-10-14 16:25:18 +00:00
Collaborator

Let me check the runner docs for the default image used by the docker label, and test what the suite needs locally.

Let me check the runner docs for the default image used by the `docker` label, and test what the suite needs locally.
Collaborator

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 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):
Collaborator

Now I'll create the test workflow, following the conventions of deploy.yml:

Now I'll create the test workflow, following the conventions of `deploy.yml`:
Collaborator

Now update the project map in AGENTS.md that describes CI, and validate the workflow YAML and the exact commands the CI will run:

Now update the project map in `AGENTS.md` that describes CI, and validate the workflow YAML and the exact commands the CI will run:
Collaborator

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:

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:
Collaborator

Everything checks out. Final review of the new workflow file:

Everything checks out. Final review of the new workflow file:
Collaborator

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.js read frontend/app/... directly) plus the Foundry module tests. It runs with no installed dependencies and only needs Node 18+. The only workflow was deploy.yml, restricted to push on master.

Changes:

  • .gitea/workflows/test.yml (new) — a separate workflow from deploy, triggered on push to any branch (branches: ['**']), running on the same docker runner the deploy workflow uses:
    1. actions/checkout@v4 (same as deploy).
    2. Setup Node — keeps the container's Node if it is ≥ 18, otherwise installs the Node 22 LTS tarball (the runner container isn't guaranteed to ship Node; the fallback mirrors deploy.yml's apt-get style, and the tarball URL was verified to return 200).
    3. Run tests — npm test from the repo root.
  • AGENTS.md — extended the CI paragraph in §1 to mention the new test workflow.

Verified locally:

  • npm test passes: 34 tests, 0 failures (Node v20.20.2).
  • The workflow YAML parses and yields the intended push/branches: ['**'] trigger and three steps.
  • The Setup Node guard behaves correctly under bash and sh: keeps an existing Node ≥ 18 and takes the install branch when Node is absent.

Nothing was committed; the automation will handle that.

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.js` read `frontend/app/...` directly) plus the Foundry module tests. It runs with no installed dependencies and only needs Node 18+. The only workflow was `deploy.yml`, restricted to `push` on `master`. **Changes:** - **`.gitea/workflows/test.yml`** (new) — a separate workflow from deploy, triggered on `push` to **any branch** (`branches: ['**']`), running on the same `docker` runner the deploy workflow uses: 1. `actions/checkout@v4` (same as deploy). 2. *Setup Node* — keeps the container's Node if it is ≥ 18, otherwise installs the Node 22 LTS tarball (the runner container isn't guaranteed to ship Node; the fallback mirrors deploy.yml's `apt-get` style, and the tarball URL was verified to return 200). 3. *Run tests* — `npm test` from the repo root. - **`AGENTS.md`** — extended the CI paragraph in §1 to mention the new test workflow. **Verified locally:** - `npm test` passes: 34 tests, 0 failures (Node v20.20.2). - The workflow YAML parses and yields the intended `push`/`branches: ['**']` trigger and three steps. - The Setup Node guard behaves correctly under `bash` and `sh`: keeps an existing Node ≥ 18 and takes the install branch when Node is absent. Nothing was committed; the automation will handle that.
Collaborator

Implementation is ready for review: #28

Implementation is ready for review: https://git.aranroig.com/Syndria98/dragonroll/pulls/28
Collaborator

The automated implementation stopped because of an internal error. Please check the worker logs for details.

The automated implementation stopped because of an internal error. Please check the worker logs for details.
Agent removed the working label 2026-10-14 16:31:00 +00:00
Sign in to join this conversation.
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Syndria98/dragonroll#27