forked from admin/runners-calendar
feat: complete p0 hardening sprint
This commit is contained in:
24
.github/workflows/ci.yml
vendored
24
.github/workflows/ci.yml
vendored
@@ -9,6 +9,20 @@ on:
|
||||
jobs:
|
||||
build-and-test:
|
||||
runs-on: ubuntu-latest
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:16-alpine
|
||||
env:
|
||||
POSTGRES_DB: calendar_run_test
|
||||
POSTGRES_USER: postgres
|
||||
POSTGRES_PASSWORD: postgres
|
||||
ports:
|
||||
- 5432:5432
|
||||
options: >-
|
||||
--health-cmd "pg_isready -U postgres -d calendar_run_test"
|
||||
--health-interval 10s
|
||||
--health-timeout 5s
|
||||
--health-retries 5
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
@@ -23,10 +37,18 @@ jobs:
|
||||
- name: Backend — install, build, test
|
||||
working-directory: backend
|
||||
env:
|
||||
CALENDAR_RUN_MOCK_DB: "1"
|
||||
NODE_ENV: test
|
||||
DB_HOST: 127.0.0.1
|
||||
DB_PORT: "5432"
|
||||
DB_NAME: calendar_run_test
|
||||
DB_USER: postgres
|
||||
DB_PASSWORD: postgres
|
||||
SESSION_SECRET: test-session-secret
|
||||
TURNSTILE_BYPASS_TOKEN: mock-turnstile-token
|
||||
run: |
|
||||
npm ci
|
||||
npm run build
|
||||
npm run db:migrate
|
||||
npm test
|
||||
|
||||
- name: Frontend — install, build
|
||||
|
||||
Reference in New Issue
Block a user