mirror of
https://github.com/toeverything/AFFiNE.git
synced 2025-01-05 07:53:46 +03:00
22 lines
692 B
YAML
22 lines
692 B
YAML
|
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
|
||
|
run: |
|
||
|
yarn workspace @affine/server exec prisma generate
|
||
|
yarn workspace @affine/server exec prisma db push
|
||
|
yarn workspace @affine/server data-migration run
|