Skip to content

install playwright browsers before running e2e tests #4

install playwright browsers before running e2e tests

install playwright browsers before running e2e tests #4

Workflow file for this run

name: build
on: [push]
jobs:
build:
runs-on: ubuntu-latest
# See https://docs.github.com/en/actions/using-containerized-services/creating-postgresql-service-containers#running-jobs-directly-on-the-runner-machine
services:
postgres:
# Docker Hub image
image: postgres
env:
POSTGRES_PASSWORD: S3cret
POSTGRES_USER: user
POSTGRES_DB: authorization_db
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- name: Check out repository code
uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: lts/*
- name: Install dependencies
run: npm ci
- name: Setup env
run: cp .env.example .env
- name: Run linter and style check
run: npm run lint
- name: Run migrations and populate with dummy data
run: npm run dev-db
- name: Run integration tests
run: npm t
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Run end-to-end tests
run: npm run e2e
- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 15