generated from bcgov/quickstart-openshift
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
604a79b
commit 9e4fd85
Showing
2 changed files
with
72 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,48 +14,48 @@ concurrency: | |
cancel-in-progress: true | ||
|
||
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 | ||
strategy: | ||
matrix: | ||
dir: [backend, 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: "22" | ||
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 }}/') | ||
# 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 | ||
# strategy: | ||
# matrix: | ||
# dir: [backend, 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: "22" | ||
# 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: | ||
|
@@ -82,7 +82,7 @@ jobs: | |
|
||
results: | ||
name: Analysis Results | ||
needs: [tests, trivy] | ||
# needs: [tests, trivy] | ||
if: always() | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,10 +12,10 @@ jobs: | |
# https://github.com/bcgov-nr/action-builder-ghcr | ||
builds: | ||
name: Builds | ||
runs-on: ubuntu-22.04 | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
package: [backend, frontend, migrations] | ||
package: [backend, frontend] | ||
timeout-minutes: 10 | ||
steps: | ||
- uses: bcgov-nr/[email protected] | ||
|
@@ -27,32 +27,32 @@ jobs: | |
triggers: ('${{ matrix.package }}/') | ||
|
||
# https://github.com/bcgov/quickstart-openshift-helpers | ||
deploys: | ||
name: Deploys | ||
needs: [builds] | ||
uses: bcgov/quickstart-openshift-helpers/.github/workflows/[email protected] | ||
secrets: | ||
oc_namespace: ${{ secrets.OC_NAMESPACE }} | ||
oc_token: ${{ secrets.OC_TOKEN }} | ||
with: | ||
triggers: ('backend/' 'frontend/' 'migrations/') | ||
params: | ||
--set global.secrets.persist=false | ||
# deploys: | ||
# name: Deploys | ||
# needs: [builds] | ||
# uses: bcgov/quickstart-openshift-helpers/.github/workflows/[email protected] | ||
# secrets: | ||
# oc_namespace: ${{ secrets.OC_NAMESPACE }} | ||
# oc_token: ${{ secrets.OC_TOKEN }} | ||
# with: | ||
# triggers: ('backend/' 'frontend/' 'migrations/') | ||
# params: | ||
# --set global.secrets.persist=false | ||
|
||
tests: | ||
name: Tests | ||
if: needs.deploys.outputs.triggered == 'true' | ||
needs: [deploys] | ||
uses: ./.github/workflows/.tests.yml | ||
with: | ||
target: ${{ github.event.number }} | ||
# tests: | ||
# name: Tests | ||
# if: needs.deploys.outputs.triggered == 'true' | ||
# needs: [deploys] | ||
# uses: ./.github/workflows/.tests.yml | ||
# with: | ||
# target: ${{ github.event.number }} | ||
|
||
results: | ||
name: PR Results | ||
needs: [builds, deploys, tests] | ||
if: always() | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- if: contains(needs.*.result, 'failure') | ||
run: echo "At least one job has failed." && exit 1 | ||
- run: echo "Success!" | ||
# results: | ||
# name: PR Results | ||
# needs: [builds, deploys, tests] | ||
# if: always() | ||
# runs-on: ubuntu-22.04 | ||
# steps: | ||
# - if: contains(needs.*.result, 'failure') | ||
# run: echo "At least one job has failed." && exit 1 | ||
# - run: echo "Success!" |