Skip to content

Commit 108b9f5

Browse files
chore: add migrations workflow
1 parent cdb6114 commit 108b9f5

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

.github/workflows/migrations.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: DB Migration
2+
3+
on:
4+
pull_request:
5+
branches: [main]
6+
7+
jobs:
8+
checks:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/checkout@v3
13+
with:
14+
submodules: recursive
15+
16+
- name: Update
17+
run: sudo apt update
18+
- name: Install OS dependencies
19+
run: sudo apt install -y python3-dev nodejs
20+
21+
- uses: actions/checkout@v3
22+
with:
23+
submodules: recursive
24+
25+
- name: Install graphile-migrate
26+
run: npm install -g graphile-migrate
27+
28+
- name: Install NodeJS dependencies
29+
run: yarn install
30+
31+
- name: Codegen TypeScript
32+
run: yarn codegen
33+
34+
- name: Build TypeScript
35+
run: yarn build
36+
37+
- name: Start-up local test environment
38+
uses: isbang/[email protected]
39+
with:
40+
compose-file: "./ci-compose.yml"
41+
42+
- name: Graphile-migrate reset DB
43+
run: . .gm.env && graphile-migrate reset --erase
44+
45+
- name: Run graphile-migrate migrations
46+
run: . .gm.env && graphile-migrate migrate

0 commit comments

Comments
 (0)