Skip to content

feat: #2336, #2351 cypress test moisture content screen part 2 #4621

feat: #2336, #2351 cypress test moisture content screen part 2

feat: #2336, #2351 cypress test moisture content screen part 2 #4621

Workflow file for this run

name: Analysis
on:
push:
branches: [main]
pull_request:
types: [opened, reopened, synchronize, ready_for_review, converted_to_draft]
schedule:
- cron: "0 11 * * 0" # 3 AM PST = 12 PM UDT, runs sundays
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions: {}
jobs:
lint:
name: Typescript lint
runs-on: ubuntu-24.04
steps:
- uses: bcgov/action-test-and-analyse@87f88c90526b8b05cea760492ff33db4ba6e271b # v1.6.0
with:
commands: |
npm ci --ignore-scripts
npm run lint
dir: frontend
node_version: "22"
tests-backend:
name: Backend Java CI
if: (! github.event.pull_request.draft)
runs-on: ubuntu-24.04
steps:
- uses: bcgov/action-test-and-analyse-java@7c7309721cae054b3e837c723afa4efb4b1a256d # v1.1.0
with:
commands: mvn --no-transfer-progress clean compile verify package checkstyle:checkstyle -P all-tests
dir: backend
java-cache: maven
java-distribution: temurin
java-version: "17"
sonar_args:
-Dsonar.organization=bcgov-sonarcloud -Dsonar.projectKey=nr-spar_backend
-Dsonar.coverage.jacoco.xmlReportPaths=target/coverage-reports/merged-test-report/jacoco.xml
-Dsonar.exclusions=**/config/**,*/dto/**,**/entity/**,**/exception/**,**/filter/**,**/interceptor/**,**/response/**,**/**Builder*,**/RestExceptionEndpoint.*,**/BackendStartApiApplication.*
sonar_token: ${{ secrets.SONAR_BACKEND }}
tests-oracle-api:
name: Oracle API Java CI
if: (! github.event.pull_request.draft)
runs-on: ubuntu-24.04
steps:
- uses: bcgov/action-test-and-analyse-java@7c7309721cae054b3e837c723afa4efb4b1a256d # v1.1.0
with:
commands: mvn --no-transfer-progress clean compile verify package checkstyle:checkstyle -P all-tests
dir: oracle-api
java-cache: maven
java-distribution: temurin
java-version: "17"
sonar_args:
-Dsonar.organization=bcgov-sonarcloud -Dsonar.projectKey=nr-spar_oracle-api
-Dsonar.coverage.jacoco.xmlReportPaths=target/coverage-reports/merged-test-report/jacoco.xml
-Dsonar.exclusions=**/config/**,*/dto/**,**/entity/**,**/exception/**,**/filter/**,**/interceptor/**,**/response/**,**/**Builder*,**/RestExceptionEndpoint.*,**/BackendStartApiApplication.*
sonar_token: ${{ secrets.SONAR_ORACLE_API }}
trivy:
name: Security Scan
if: (! github.event.pull_request.draft)
permissions:
security-events: write
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v5
- name: Run Trivy vulnerability scanner in repo mode
uses: aquasecurity/trivy-action@b6643a29fecd7f34b3597bc6acb0a98b03d33ff8 # 0.33.1
with:
format: "sarif"
output: "trivy-results.sarif"
ignore-unfixed: true
scan-type: "fs"
scanners: "vuln,secret,misconfig"
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
if: always()
needs: [lint, tests-backend, tests-oracle-api, trivy]
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!"