Skip to content

Commit

Permalink
Feat/workflows (#9)
Browse files Browse the repository at this point in the history
* Duplicate license

* Cleanup

* Add network policies to backend

* Remove quickstart database and migrations

* Temporarily disable Caddy

* Removed extra package-lock.json

* Vars in backend

* Vars in frontend

* Update test commands
  • Loading branch information
DerekRoberts authored Sep 21, 2023
1 parent bec62a4 commit d2b84a9
Show file tree
Hide file tree
Showing 77 changed files with 127 additions and 13,903 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ jobs:
with:
commands: |
npm ci
npm run test:cov
npm run test
dir: ${{ matrix.dir }}
node_version: "20"
sonar_args: >
Expand Down
57 changes: 4 additions & 53 deletions .github/workflows/merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,10 @@ jobs:
issues: write
strategy:
matrix:
name: [database, backend, frontend]
name: [backend, frontend]
include:
- name: database
file: database/openshift.deploy.yml
overwrite: false
- name: backend
file: backend/openshift.deploy.yml
parameters: -p PROMOTE_MIGRATION=${{ github.repository }}/migrations:test
overwrite: true
verification_path: /api
- name: frontend
Expand Down Expand Up @@ -119,7 +115,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
name: [database, migrations, backend, frontend]
name: [backend, frontend]
steps:
- name: Keep last 50
uses: actions/delete-package-versions@v4
Expand All @@ -136,14 +132,10 @@ jobs:
runs-on: ubuntu-22.04
strategy:
matrix:
name: [database, backend, frontend]
name: [backend, frontend]
include:
- name: database
file: database/openshift.deploy.yml
overwrite: false
- name: backend
file: backend/openshift.deploy.yml
parameters: -p PROMOTE_MIGRATION=${{ github.repository }}/migrations:test
overwrite: true
verification_path: /api
- name: frontend
Expand Down Expand Up @@ -171,52 +163,11 @@ jobs:
packages: write
strategy:
matrix:
component: [database, backend, frontend]
component: [backend, frontend]
steps:
- uses: shrink/actions-docker-registry-tag@v3
with:
registry: ghcr.io
repository: ${{ github.repository }}/${{ matrix.component }}
target: test
tags: prod

generate-schema-spy:
name: Generate SchemaSpy Documentation
runs-on: ubuntu-22.04
services:
postgres:
image: postgres
env:
POSTGRES_DB: default
POSTGRES_USER: default
POSTGRES_PASSWORD: default
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- uses: actions/checkout@v4
- uses: joshuaavalon/[email protected]
name: Generate SchemaSpy docs for node backend
with:
url: jdbc:postgresql://postgres:5432/default
user: default
password: default
env:
FLYWAY_VALIDATE_MIGRATION_NAMING: true
FLYWAY_LOCATIONS: filesystem:./backend/db/migrations
FLYWAY_DEFAULT_SCHEMA: "users"
- 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 pgsql -db default -host 127.0.0.1 -port 5432 -u default -p default -schemas users
- name: Deploy to Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: output
target-folder: schemaspy
2 changes: 1 addition & 1 deletion .github/workflows/pr-close.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
packages: write
strategy:
matrix:
package: [database, migrations, backend, frontend]
package: [backend, frontend]
steps:
- uses: shrink/actions-docker-registry-tag@v3
with:
Expand Down
19 changes: 4 additions & 15 deletions .github/workflows/pr-open.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,8 @@ jobs:
packages: write
strategy:
matrix:
package: [database, migrations, backend, frontend]
package: [backend, frontend]
include:
- package: database
triggers: ('database/')
- package: migrations
build_context: ./backend/db
build_file: ./backend/db/Dockerfile
triggers: ('backend/db')
- package: backend
triggers: ('backend/')
- package: frontend
Expand All @@ -80,24 +74,19 @@ jobs:
runs-on: ubuntu-22.04
strategy:
matrix:
name: [database, backend, frontend]
name: [backend, frontend]
include:
- name: database
file: database/openshift.deploy.yml
overwrite: false
triggers: ('database/' 'backend/' 'frontend/')
- name: backend
file: backend/openshift.deploy.yml
overwrite: true
parameters: -p MIN_REPLICAS=1 -p MAX_REPLICAS=2
-p PROMOTE_MIGRATION=${{ github.repository }}/migrations:${{ github.event.number }}
triggers: ('database/' 'backend/' 'frontend/')
triggers: ('backend/' 'frontend/')
verification_path: /api
- name: frontend
file: frontend/openshift.deploy.yml
overwrite: true
parameters: -p MIN_REPLICAS=1 -p MAX_REPLICAS=2
triggers: ('database/' 'backend/' 'frontend/')
triggers: ('backend/' 'frontend/')
steps:
- uses: bcgov-nr/[email protected]
with:
Expand Down
201 changes: 0 additions & 201 deletions LICENSE.md

This file was deleted.

12 changes: 0 additions & 12 deletions backend/db/Dockerfile

This file was deleted.

24 changes: 0 additions & 24 deletions backend/db/migrations/V1.0.0__init.sql

This file was deleted.

1 change: 0 additions & 1 deletion backend/db/migrations/V1.0.1__alter_user_seq.sql

This file was deleted.

Loading

0 comments on commit d2b84a9

Please sign in to comment.