Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/workflows/test-backend.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Test (backend)
on:
push:
branches: [main]
paths: ["backend/**"]
pull_request:
paths: ["backend/**"]

jobs:
lint:
name: Test
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v6

- uses: actions/setup-node@v6
with:
node-version: 24
cache: "npm"
cache-dependency-path: backend/package.json

- name: Install NPM packages
working-directory: backend
run: npm ci

- name: Run code generators
working-directory: backend
run: DATABASE_URL=placeholder npx prisma generate

- name: Test
working-directory: backend
run: npm run test
3 changes: 2 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"Prisma.prisma",
"redhat.vscode-yaml",
"dbaeumer.vscode-eslint",
"timonwong.shellcheck"
"timonwong.shellcheck",
"vitest.explorer"
]
}
12 changes: 9 additions & 3 deletions backend/eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export default defineConfig({
},
{
from: "db",
allow: ["db/errors", "env"],
allow: ["db/errors"],
},
{
from: "handlers",
Expand All @@ -70,7 +70,7 @@ export default defineConfig({
},
{
from: "services",
allow: ["db/errors", "services/errors", "lib", "env"],
allow: ["db/errors", "services/errors", "lib"],
},
{
from: ["lib", "handlers", "services"],
Expand All @@ -79,7 +79,7 @@ export default defineConfig({
},
{
from: "services/index",
allow: ["db", "services"],
allow: ["db", "services", "env"],
},
{
from: "*",
Expand All @@ -98,6 +98,10 @@ export default defineConfig({
from: "index",
allow: ["env", "db", "server", "services/index"],
},
{
from: "test",
allow: "*",
},
],
},
],
Expand Down Expand Up @@ -147,6 +151,8 @@ export default defineConfig({
{ type: "server", pattern: "server/**" },
// Environment variables
{ type: "env", pattern: "src/lib/env.ts", mode: "full" },
// Vitest test files
{ type: "test", pattern: "test/**" },
],
},
});
Loading
Loading