Skip to content

🦂 Init playwright tests #5

🦂 Init playwright tests

🦂 Init playwright tests #5

Workflow file for this run

name: Playwright Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-latest
services:
postgres:
image: postgres
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- "5432:5432"
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: Install Playwright Browsers
run: pnpm exec playwright install --with-deps
- name: Run migrations
run: pnpm exec drizzle push:pg
env:
DRIZZLE_DATABASE_URL: postgresql://postgres:postgres@localhost:5432/postgres
- name: Run Playwright tests
run: pnpm exec playwright test
env:
DRIZZLE_DATABASE_URL: postgresql://postgres:postgres@localhost:5432/postgres
- uses: actions/upload-artifact@v3
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30