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: add leaflet app #1

Merged
merged 9 commits into from
May 10, 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
108 changes: 54 additions & 54 deletions .github/workflows/.tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,70 +20,70 @@ env:
PREFIX: ${{ github.event.repository.name }}-${{ inputs.target }}

jobs:
integration-tests:
name: Integration
runs-on: ubuntu-22.04
timeout-minutes: 1
steps:
- uses: actions/checkout@v4
- id: cache-npm
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-build-cache-node-modules-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-cache-node-modules-
${{ runner.os }}-build-
${{ runner.os }}-
# integration-tests:
# name: Integration
# runs-on: ubuntu-22.04
# timeout-minutes: 1
# steps:
# - uses: actions/checkout@v4
# - id: cache-npm
# uses: actions/cache@v4
# with:
# path: ~/.npm
# key: ${{ runner.os }}-build-cache-node-modules-${{ hashFiles('**/package-lock.json') }}
# restore-keys: |
# ${{ runner.os }}-build-cache-node-modules-
# ${{ runner.os }}-build-
# ${{ runner.os }}-

- env:
API_NAME: nest
BASE_URL: https://${{ github.event.repository.name }}-${{ inputs.target }}-frontend.${{ env.DOMAIN }}
run: |
cd tests/integration
npm ci
node src/main.js
# - env:
# API_NAME: nest
# BASE_URL: https://${{ github.event.repository.name }}-${{ inputs.target }}-frontend.${{ env.DOMAIN }}
# run: |
# cd tests/integration
# npm ci
# node src/main.js

cypress-e2e-tests:
name: E2E
runs-on: ubuntu-22.04
strategy:
matrix:
browser: [chrome, firefox, edge]
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- id: cache-npm
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-build-cache-node-modules-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-cache-node-modules-
${{ runner.os }}-build-
${{ runner.os }}-
# cypress-e2e-tests:
# name: E2E
# runs-on: ubuntu-22.04
# strategy:
# matrix:
# browser: [chrome, firefox, edge]
# timeout-minutes: 5
# steps:
# - uses: actions/checkout@v4
# - id: cache-npm
# uses: actions/cache@v4
# with:
# path: ~/.npm
# key: ${{ runner.os }}-build-cache-node-modules-${{ hashFiles('**/package-lock.json') }}
# restore-keys: |
# ${{ runner.os }}-build-cache-node-modules-
# ${{ runner.os }}-build-
# ${{ runner.os }}-

- uses: cypress-io/github-action@v6
env:
CYPRESS_baseUrl: https://${{ github.event.repository.name }}-${{ inputs.target }}-frontend.${{ env.DOMAIN }}/
with:
config: pageLoadTimeout=10000
working-directory: ./frontend
browser: ${{ matrix.browser }}
# - uses: cypress-io/github-action@v6
# env:
# CYPRESS_baseUrl: https://${{ github.event.repository.name }}-${{ inputs.target }}-frontend.${{ env.DOMAIN }}/
# with:
# config: pageLoadTimeout=10000
# working-directory: ./frontend
# browser: ${{ matrix.browser }}

- uses: actions/upload-artifact@v4
if: failure()
with:
name: cypress-screenshots
path: ./cypress/screenshots
if-no-files-found: ignore # 'warn' or 'error' are also available, defaults to `warn`
# - uses: actions/upload-artifact@v4
# if: failure()
# with:
# name: cypress-screenshots
# path: ./cypress/screenshots
# if-no-files-found: ignore # 'warn' or 'error' are also available, defaults to `warn`

load-tests:
name: Load
runs-on: ubuntu-22.04
strategy:
matrix:
name: [backend, frontend]
name: [frontend]
steps:
- uses: actions/checkout@v4
- uses: grafana/[email protected]
Expand Down
66 changes: 33 additions & 33 deletions .github/workflows/analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,47 +15,47 @@ concurrency:

jobs:
tests:
name: Tests
if: ${{ ! github.event.pull_request.draft }}
runs-on: ubuntu-22.04
timeout-minutes: 5
services:
postgres:
image: postgres
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
# name: Tests
# if: ${{ ! github.event.pull_request.draft }}
# runs-on: ubuntu-22.04
# timeout-minutes: 5
# services:
# postgres:
# image: postgres
# env:
# POSTGRES_PASSWORD: postgres
# options: >-
# --health-cmd pg_isready
# --health-interval 10s
# --health-timeout 5s
# --health-retries 5
# ports:
# - 5432:5432
strategy:
matrix:
dir: [backend, frontend]
dir: [frontend]
include:
- dir: backend
token: SONAR_TOKEN_BACKEND
- dir: frontend
token: SONAR_TOKEN_FRONTEND
steps:
- uses: bcgov-nr/[email protected]
with:
commands: |
npm ci
npm run test:cov
dir: ${{ matrix.dir }}
node_version: "20"
sonar_args: >
-Dsonar.exclusions=**/coverage/**,**/node_modules/**,**/*spec.ts
-Dsonar.organization=bcgov-sonarcloud
-Dsonar.projectKey=quickstart-openshift_${{ matrix.dir }}
-Dsonar.sources=src
-Dsonar.tests.inclusions=**/*spec.ts
-Dsonar.javascript.lcov.reportPaths=./coverage/lcov.info
sonar_token: ${{ secrets[matrix.token] }}
triggers: ('${{ matrix.dir }}/')
# - uses: bcgov-nr/[email protected]
# with:
# commands: |
# npm ci
# npm run test:cov
# dir: ${{ matrix.dir }}
# node_version: "20"
# sonar_args: >
# -Dsonar.exclusions=**/coverage/**,**/node_modules/**,**/*spec.ts
# -Dsonar.organization=bcgov-sonarcloud
# -Dsonar.projectKey=quickstart-openshift_${{ matrix.dir }}
# -Dsonar.sources=src
# -Dsonar.tests.inclusions=**/*spec.ts
# -Dsonar.javascript.lcov.reportPaths=./coverage/lcov.info
# sonar_token: ${{ secrets[matrix.token] }}
# triggers: ('${{ matrix.dir }}/')

# https://github.com/marketplace/actions/aqua-security-trivy
trivy:
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,9 @@ jobs:
with:
environment: prod
params:
--set backend.deploymentStrategy=RollingUpdate
--set frontend.deploymentStrategy=RollingUpdate
--set global.autoscaling=true
--set frontend.pdb.enabled=true
--set backend.pdb.enabled=true
promote:
name: Promote Images
needs: [deploy-prod, vars]
Expand All @@ -66,7 +64,7 @@ jobs:
packages: write
strategy:
matrix:
package: [migrations, backend, frontend]
package: [frontend]
timeout-minutes: 1
steps:
- uses: shrink/actions-docker-registry-tag@v4
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pr-open.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-22.04
strategy:
matrix:
package: [backend, frontend, migrations]
package: [frontend]
timeout-minutes: 10
steps:
- uses: bcgov-nr/[email protected]
Expand All @@ -35,7 +35,7 @@ jobs:
oc_namespace: ${{ secrets.OC_NAMESPACE }}
oc_token: ${{ secrets.OC_TOKEN }}
with:
triggers: ('backend/' 'frontend/' 'migrations/')
triggers: ('frontend/')
params:
--set global.secrets.persist=false

Expand Down
1 change: 0 additions & 1 deletion .github/workflows/pr-validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ jobs:
with:
markdown_links: |
- [Frontend](https://${{ github.event.repository.name }}-${{ github.event.number }}-frontend.apps.silver.devops.gov.bc.ca)
- [Backend](https://${{ github.event.repository.name }}-${{ github.event.number }}-frontend.apps.silver.devops.gov.bc.ca/api)

results:
name: Validate Results
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -120,3 +120,6 @@ test-report.xml

# VSCode
.vscode/

# misc junk files
junk.txt
5 changes: 0 additions & 5 deletions backend/.dockerignore

This file was deleted.

44 changes: 0 additions & 44 deletions backend/Dockerfile

This file was deleted.

4 changes: 0 additions & 4 deletions backend/nest-cli.json

This file was deleted.

Loading
Loading