chore: postgres 17 upgrade #1030
Workflow file for this run
This file contains hidden or 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
| name: Analysis | |
| on: | |
| pull_request: | |
| types: [opened, reopened, synchronize, ready_for_review, converted_to_draft] | |
| push: | |
| branches: [main] | |
| schedule: | |
| - cron: "30 8 1 * *" # 8:30 UDT = 12:30 PDT, runs monthly | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: {} | |
| jobs: | |
| tests: | |
| name: Unit Tests | |
| if: (! github.event.pull_request.draft) | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: bcgov/action-test-and-analyse@v1.2.1 | |
| with: | |
| commands: | | |
| npm ci | |
| npm run test-unit | |
| dir: api | |
| node_version: 18.18.2 | |
| sonar_args: > | |
| -Dsonar.exclusions=**/*.spec.ts | |
| -Dsonar.javascript.lcov.reportPaths=coverage/api/lcov.info | |
| -Dsonar.organization=bcgov-sonarcloud | |
| -Dsonar.projectKey=nr-fom | |
| sonar_token: ${{ secrets.SONAR_TOKEN }} | |
| # https://github.com/marketplace/actions/aqua-security-trivy | |
| trivy: | |
| name: Trivy Security Scan | |
| if: (! github.event.pull_request.draft) | |
| permissions: | |
| security-events: write | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Run Trivy vulnerability scanner in repo mode | |
| uses: aquasecurity/trivy-action@0.30.0 | |
| with: | |
| format: "sarif" | |
| output: "trivy-results.sarif" | |
| ignore-unfixed: true | |
| scan-type: "fs" | |
| scanners: "vuln,secret,config" | |
| severity: "CRITICAL,HIGH" | |
| - name: Upload Trivy scan results to GitHub Security tab | |
| uses: github/codeql-action/upload-sarif@v3 | |
| with: | |
| sarif_file: "trivy-results.sarif" | |
| results: | |
| name: Analysis Results | |
| needs: [tests, trivy] | |
| if: always() | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - if: contains(needs.*.result, 'failure')||contains(needs.*.result, 'canceled') | |
| run: echo "At least one job has failed." && exit 1 | |
| - run: echo "Success!" |