Skip to content

Merge pull request #1830 from bcgov/develop #497

Merge pull request #1830 from bcgov/develop

Merge pull request #1830 from bcgov/develop #497

Workflow file for this run

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