Files
GearBox/.gitea/workflows/ci.yml
Jean-Luc Makiola 54614869cf
Some checks failed
CI / ci (push) Successful in 1m0s
CI / e2e (push) Failing after 8m39s
fix: migrate E2E tests from SQLite to Postgres
- Rewrite e2e/seed.ts to use postgres driver instead of bun:sqlite
- Add userId to all seeded entities (multi-user schema)
- Add Postgres service container to CI E2E job
- Remove DATABASE_PATH from test server start script
- Re-enable E2E job in CI

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 20:56:11 +02:00

75 lines
1.8 KiB
YAML

name: CI
on:
push:
pull_request:
jobs:
ci:
runs-on: docker
container:
image: oven/bun:1
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install dependencies
run: bun install --frozen-lockfile --ignore-scripts
- name: Lint
run: bun run lint
- name: Test
run: |
bun test || EXIT=$?
# Exit 99 = all tests passed but module-level errors (bun mock isolation)
if [ "${EXIT:-0}" = "99" ]; then echo "⚠ Exit 99: tests passed, mock isolation warnings"; exit 0; fi
exit ${EXIT:-0}
- name: Build
run: bun run build
e2e:
needs: ci
runs-on: docker
container:
image: mcr.microsoft.com/playwright:v1.59.1-noble
services:
postgres:
image: postgres:16-alpine
env:
POSTGRES_USER: gearbox
POSTGRES_PASSWORD: gearbox
POSTGRES_DB: gearbox
options: >-
--health-cmd "pg_isready -U gearbox"
--health-interval 10s
--health-timeout 5s
--health-retries 5
env:
DATABASE_URL: postgresql://gearbox:gearbox@postgres:5432/gearbox
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Bun
run: |
apt-get update && apt-get install -y unzip
curl -fsSL https://bun.sh/install | bash
echo "$HOME/.bun/bin" >> $GITHUB_PATH
- name: Install dependencies
run: |
export PATH="$HOME/.bun/bin:$PATH"
bun install --frozen-lockfile --ignore-scripts
- name: Build client
run: |
export PATH="$HOME/.bun/bin:$PATH"
bun run build
- name: Run E2E tests
run: |
export PATH="$HOME/.bun/bin:$PATH"
CI=true bun run test:e2e