Skip to content

GHA fixes

GHA fixes #25

Workflow file for this run

name: Run Tests
on: [push, pull_request]
env:
DATABASE_PRISMA_URL: postgres://postgres:postgres@localhost:5432/test
DATABASE_URL: postgres://postgres:postgres@localhost:5432/test
PUBLIC_URL: http://localhost:5173
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ['18.x']
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
services:
postgres:
image: postgres:13
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: test
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Run postinstall (db stuff)
run: yarn postinstall
- name: Build in node mode
run: yarn nodebuild
- name: Install playwright
run: npx playwright install
- name: Install Playwright dependencies (just chromium for now)
run: npx playwright install-deps chromium
- name: Run tests
run: yarn test