Skip to content
Open
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
29 changes: 29 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,15 @@ jobs:
--health-interval 10s
--health-timeout 5s
--health-retries 5
redis:
image: redis:7-alpine
ports:
- 6379:6379
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
env:
DATABASE_URL: postgresql://postgres:[email protected]:5432/codra_test
TEST_DATABASE_URL: postgresql://postgres:[email protected]:5432/codra_test
Expand Down Expand Up @@ -91,3 +100,23 @@ jobs:

- name: Build (worker bundle, dry run)
run: cd apps/worker && npx wrangler deploy --dry-run --outdir=.wrangler/dry

- name: Install Playwright browsers
run: npx playwright install chromium --with-deps

- name: Prepare E2E environment
run: |
cp .env.e2e.example .env.e2e
node -e "import('postgres').then(async ({default: p}) => { const sql = p('postgresql://postgres:[email protected]:5432/postgres'); await sql\`CREATE DATABASE codra_e2e\`.catch(() => {}); await sql.end(); })"
DATABASE_URL=postgresql://postgres:[email protected]:5432/codra_e2e npm run migrate

- name: Run Playwright E2E tests
run: npm run test:e2e

- name: Upload Playwright report
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
if: failure()
with:
name: playwright-report
path: playwright-report/
retention-days: 14