-
Notifications
You must be signed in to change notification settings - Fork 58
45 lines (38 loc) · 1.08 KB
/
migrations.yml
File metadata and controls
45 lines (38 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: Test migrations
on:
pull_request:
push:
paths:
- 'prisma/**'
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
services:
mysql:
image: mysql:8
env:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: lostcity
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping -h localhost -uroot -ppassword" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 22
- name: Install dependencies
run: npm i
- name: Run Singleworld Migrations
run: |
set -e
npx prisma migrate reset --schema prisma/singleworld/schema.prisma --force
- name: Run Multiworld Migrations
env:
DATABASE_URL: "mysql://root:password@localhost:3306/lostcity"
run: |
set -e
npx prisma migrate reset --schema prisma/multiworld/schema.prisma --force