diff --git a/.github/workflows/analysis.yml b/.github/workflows/analysis.yml index 108c8fae..e313e59e 100644 --- a/.github/workflows/analysis.yml +++ b/.github/workflows/analysis.yml @@ -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/action-test-and-analyse@v1.2.1 - 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/action-test-and-analyse@v1.2.1 + # 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: diff --git a/.github/workflows/pr-open.yml b/.github/workflows/pr-open.yml index 3d72ca19..307dd948 100644 --- a/.github/workflows/pr-open.yml +++ b/.github/workflows/pr-open.yml @@ -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/action-builder-ghcr@v2.2.0 @@ -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/.deployer.yml@v0.6.1 - 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/.deployer.yml@v0.6.1 + # 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!"