508fa39835
- Wrap startup syncs in safeStartup() to prevent crash on external service failure - Add migrate-entrypoint.sh for auto-generating migrations from schema diff - Update Dockerfile migration stage to use entrypoint script - Add test job to build-and-publish workflow (runs before build) - Add tests.yaml workflow to run tests on every push - Fix test setup to use real RSA key pair instead of plain strings - Add test script to package.json
26 lines
529 B
YAML
26 lines
529 B
YAML
name: Tests
|
|
|
|
on:
|
|
push:
|
|
branches: ["**"]
|
|
|
|
jobs:
|
|
test:
|
|
name: Test
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout source code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Bun
|
|
uses: oven-sh/setup-bun@v2
|
|
|
|
- name: Install dependencies
|
|
run: bun install --frozen-lockfile
|
|
|
|
- name: Generate Prisma client
|
|
run: DATABASE_URL="postgresql://dummy:dummy@localhost:5432/dummy" bunx prisma generate
|
|
|
|
- name: Run tests
|
|
run: bun test --preload ./tests/setup.ts
|