From fba9e314084dd6f50436ff4436b052a9bbcebffd Mon Sep 17 00:00:00 2001 From: Ricardo Campos Date: Wed, 4 Oct 2023 16:05:34 -0300 Subject: [PATCH] ci: add maven command test for back end (#113) * ci: add maven command test for back end Issue #111 The added command is responsible for getting all test running, checking for style issues, code formating, and compilation. * ci: use java 21 for action test and analysis Issue #111 * ci: update java test action with oracle distribution Issue #111 * ci: fix sonar args with exclusions and coverage issue #111 * Adjust Backend with Sonar --------- Co-authored-by: Derek Roberts --- .github/workflows/analysis.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/analysis.yml b/.github/workflows/analysis.yml index 7e7b437a..d8da7bf2 100644 --- a/.github/workflows/analysis.yml +++ b/.github/workflows/analysis.yml @@ -43,18 +43,18 @@ jobs: steps: - uses: bcgov-nr/action-test-and-analyse-java@v0.2.0 with: - commands: mvn clean package + 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 + java-distribution: oracle + java-version: 21 sonar_args: > - -Dsonar.exclusions=**/coverage/**,**/node_modules/**,**/*spec.ts + -Dsonar.exclusions=**/config/**,*/dto/**,**/entity/**,**/exception/**,**/response/**,**/*$*Builder*,**/RestExceptionEndpoint.*,**/ResultsApplication.* + -Dsonar.coverage.jacoco.xmlReportPaths=target/coverage-reports/merged-test-report/jacoco.xml -Dsonar.organization=bcgov-sonarcloud -Dsonar.project.monorepo.enabled=true -Dsonar.projectKey=nr-silva-backend - -Dsonar.sources=src - sonar_token: ${{ secrets.SONAR_TOKEN_BACKEND }} + sonar_project_token: ${{ secrets.SONAR_TOKEN_BACKEND }} triggers: ${{ github.event_name == 'pull_request' && '("backend/")' || '' }} # https://github.com/marketplace/actions/aqua-security-trivy