From 59a4c1dd0c135a086ada0fa68a0c8f7adb614aea Mon Sep 17 00:00:00 2001 From: Gitea OpenCode Agent Date: Wed, 14 Oct 2026 16:30:59 +0000 Subject: [PATCH] Fix issue #27: Add frontend testing --- .gitea/workflows/test.yml | 31 +++++++++++++++++++++++++++++++ AGENTS.md | 2 ++ 2 files changed, 33 insertions(+) create mode 100644 .gitea/workflows/test.yml diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml new file mode 100644 index 00000000..3547fee2 --- /dev/null +++ b/.gitea/workflows/test.yml @@ -0,0 +1,31 @@ +name: Test + +on: + push: + branches: ['**'] + +jobs: + test: + runs-on: docker + + steps: + + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Node + run: | + # The suite runs on Node's built-in test runner and needs Node 18+. The container the + # docker runner starts jobs in is not guaranteed to ship one, so fall back to the + # official LTS tarball. The tests themselves install no dependencies. + if node -e 'process.exit(Number(process.versions.node.split(".")[0]) >= 18 ? 0 : 1)' 2>/dev/null; then + node --version + else + apt-get update -y && apt-get install -y curl ca-certificates xz-utils + curl -fsSL https://nodejs.org/dist/v22.12.0/node-v22.12.0-linux-x64.tar.xz -o /tmp/node.tar.xz + tar -xJf /tmp/node.tar.xz -C /usr/local --strip-components=1 + node --version + fi + + - name: Run tests + run: npm test diff --git a/AGENTS.md b/AGENTS.md index 904f1610..8927aa4e 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -21,6 +21,8 @@ Git: default branch `master`, hosted on a self-hosted Gitea (`git.aranroig.com/B CI (`.gitea/workflows/deploy.yml`) builds two Docker images on every push to `master`, pushes them to `git.aranroig.com//dragonroll-{frontend,backend}:latest`, copies `docker-compose.yml` + `nginx.conf` to the deploy host and runs `docker compose pull && up -d`. +`.gitea/workflows/test.yml` runs the `npm test` suite (frontend + Foundry module tests, no dependencies +installed) on every push to any branch, not just `master`. ## 2. Root layout -- 2.39.5