2024-11-01 10:05:12 +03:00
|
|
|
name: 'Prepare Server Test Environment'
|
|
|
|
description: 'Prepare Server Test Environment'
|
|
|
|
|
|
|
|
runs:
|
|
|
|
using: 'composite'
|
|
|
|
steps:
|
|
|
|
- name: Initialize database
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
psql -h localhost -U postgres -c "CREATE DATABASE affine;"
|
|
|
|
psql -h localhost -U postgres -c "CREATE USER affine WITH PASSWORD 'affine';"
|
|
|
|
psql -h localhost -U postgres -c "ALTER USER affine WITH SUPERUSER;"
|
|
|
|
env:
|
|
|
|
PGPASSWORD: affine
|
|
|
|
|
|
|
|
- name: Run init-db script
|
|
|
|
shell: bash
|
2024-12-05 17:21:59 +03:00
|
|
|
env:
|
|
|
|
NODE_ENV: test
|
2024-11-01 10:05:12 +03:00
|
|
|
run: |
|
|
|
|
yarn workspace @affine/server exec prisma generate
|
|
|
|
yarn workspace @affine/server exec prisma db push
|
|
|
|
yarn workspace @affine/server data-migration run
|