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:
@@ -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
|
||||
Reference in New Issue
Block a user