Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: SchemaSpy shared workflow #2168

Merged
merged 4 commits into from
Nov 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/pr-close.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ jobs:
with:
cleanup: helm
packages: backend frontend migrations

cleanup_db: # TODO move it off to another action later.
name: Remove DB User from crunchy.
name: Remove DB User from crunchy
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
name: Checkout
- name: Install CLI tools from OpenShift Mirror
uses: redhat-actions/openshift-tools-installer@v1
with:
Expand All @@ -39,7 +39,7 @@ jobs:
oc login --token=$OC_TEMP_TOKEN --server=https://api.silver.devops.gov.bc.ca:6443
oc project ${{ secrets.oc_namespace }} # Safeguard!

- name: Remove PR user and database from crunchy.
- name: Remove PR user and database from crunchy
shell: bash
run: |
# check if postgres-crunchy exists or else exit
Expand Down
45 changes: 4 additions & 41 deletions .github/workflows/scheduled.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,48 +54,11 @@ jobs:
fi
done

generate-schema-spy:
name: Generate SchemaSpy Documentation
runs-on: ubuntu-24.04
services:
postgres:
image: postgis/postgis:16-3.4
env:
POSTGRES_DB: default
POSTGRES_USER: postgres
POSTGRES_PASSWORD: default
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- name: Flyway
uses: docker://flyway/flyway:10
env:
FLYWAY_URL: jdbc:postgresql://postgres:5432/default
FLYWAY_USER: postgres
FLYWAY_PASSWORD: default
FLYWAY_LOCATIONS: filesystem:./migrations
FLYWAY_DEFAULT_SCHEMA: "users"
with:
args: info migrate info
# https://github.com/bcgov/quickstart-openshift-helpers
schema-spy:
name: SchemaSpy Documentation
uses: bcgov/quickstart-openshift-helpers/.github/workflows/[email protected]

- 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:6.2.4 -t pgsql11 -db default -host 127.0.0.1 -port 5432 -u postgres -p default -schemas users
- name: Deploy to Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: output
target-folder: schemaspy

tests:
name: Tests
Expand Down
Loading