-
Notifications
You must be signed in to change notification settings - Fork 1
51 lines (48 loc) · 1.44 KB
/
schemaspy.yml
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
51
name: Generate Schemaspy Docs
on:
push:
branches:
- main
env:
NODE_ENV: test
jobs:
generate_schemaspy:
runs-on: ubuntu-latest
services:
postgres:
image: postgres
env:
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
ports:
- 5432:5432
steps:
- uses: actions/checkout@master
- uses: actions/setup-node@master
with:
node-version: 18
- run: |
sudo apt-get install --yes --no-install-recommends postgresql-client
- run: |
export PGPASSWORD='postgres';
psql -h 127.0.0.1 -U postgres -c 'CREATE SCHEMA IF NOT EXISTS alcs;'
- name: Setup Database
run: |
npm install
npm run alcs:migration:run
working-directory: services
- name: Import OATS
run: |
export PGPASSWORD='postgres';
psql -h 127.0.0.1 -p 5432 -U postgres -f ora2pg/data/oats_prod_schema_ddl_18_2.sql
- name: Create Output Folder
run: |
mkdir output
chmod a+rwx -R output
- name: Run Schemaspy
run: docker run --network host -v "$PWD/output:/output" schemaspy/schemaspy:snapshot -t pgsql -db postgres -host 127.0.0.1 -port 5432 -u postgres -p postgres -schemas alcs,oats
- name: Deploy to Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: output
target-folder: schemaspy