-
Notifications
You must be signed in to change notification settings - Fork 104
50 lines (41 loc) · 1.24 KB
/
db-types-diff.yaml
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
46
47
48
49
50
on:
workflow_call:
jobs:
diff:
runs-on: ubuntu-22.04
services:
postgres:
image: postgres:16.4-alpine
ports:
- 5432:5432
env:
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
POSTGRES_DB: registry
options: >-
--health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
env:
POSTGRES_HOST: localhost
POSTGRES_PORT: 5432
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
POSTGRES_DB: registry
steps:
- name: checkout
uses: actions/checkout@v4
- name: setup environment
uses: ./.github/actions/setup
with:
codegen: false # no need to run codegen in this case, we can skip
actor: db-types-diff
- name: create database
working-directory: packages/migrations
run: pnpm db:create
- name: migrate database
working-directory: packages/migrations
run: pnpm db:migrator up
- name: generate database types
working-directory: packages/services/storage
run: pnpm db:generate
- name: check database types
run: git diff --exit-code ./packages/services/storage/src/db/types.ts