Skip to content

Bump Remix and add Registration e2e test #39

Bump Remix and add Registration e2e test

Bump Remix and add Registration e2e test #39

Workflow file for this run

name: Playwright Tests
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-latest
env:
DATABASE_URL: postgresql://postgres:postgres@localhost:5432/test_db
SESSION_SECRET: ${{ secrets.SESSION_SECRET }}
HONEYPOT_SECRET: ${{ secrets.HONEYPOT_SECRET }}
CLOUDINARY_SECRET: ${{ secrets.CLOUDINARY_SECRET }}
CLOUDINARY_KEY: ${{ secrets.CLOUDINARY_KEY }}
RESEND_API_KEY: ${{ secrets.RESEND_API_KEY }}
FRONTEND_URL: "http://localhost:3000"
CLOUDINARY_CLOUD_NAME: "bidhub"
CLOUDINARY_LEGACY_URL: "https://api.cloudinary.com/v1_1/bidhub/image/upload"
services:
postgres:
image: postgres:latest
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: test_db
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Install dependencies
run: npm install -g pnpm && pnpm install
- name: Generate Prisma
run: npx prisma migrate deploy
- name: Seed database
run: npx prisma db seed
- name: Install Playwright Browsers
run: pnpm exec playwright install --with-deps
- name: Run Playwright tests
run: pnpm run test:e2e
- uses: actions/upload-artifact@v3
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30
- uses: actions/upload-artifact@v3
if: always()
with:
name: webserver-logs
path: webserver.log
retention-days: 30
- name: Tear down Postgres
if: ${{ always() }}
run: psql postgres://postgres:postgres@localhost:5432/test_db -c 'DROP SCHEMA public CASCADE; CREATE SCHEMA public;'