Add Gitea Actions workflow to run tests on every push
Tests / test (push) Successful in 1m1s

Self-hosted Gitea runner picks up `.gitea/workflows/test.yml`. The job
installs deps with the committed pnpm-lock, regenerates the Prisma
client, then runs the backend Jest suite and the frontend Vitest suite
as separate steps so a failure points at the right package. Tests mock
Prisma so no database is needed in CI.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-01 11:45:52 -07:00
parent 0aa2daaee4
commit 5f1918bbce
+32
View File
@@ -0,0 +1,32 @@
name: Tests
on:
push:
pull_request:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 9
- uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Generate Prisma client
run: pnpm --filter tehriehlbudget-backend exec prisma generate
- name: Backend tests (Jest)
run: pnpm test:backend
- name: Frontend tests (Vitest)
run: pnpm test:frontend