diff --git a/.github/workflows/merge-main.yml b/.github/workflows/merge-main.yml index 2a1faa0ff7..f50541ed7f 100644 --- a/.github/workflows/merge-main.yml +++ b/.github/workflows/merge-main.yml @@ -19,7 +19,7 @@ jobs: if: github.event_name != 'pull_request' || !github.event.pull_request.draft runs-on: ubuntu-22.04 steps: - - uses: bcgov-nr/action-test-and-analyse-java@v0.2.0 + - uses: bcgov-nr/action-test-and-analyse-java@v1.0.0 name: Backend Coverage with: commands: | @@ -34,8 +34,9 @@ jobs: -Dsonar.coverage.jacoco.xmlReportPaths=target/coverage-reports/merged-test-report/jacoco.xml -Dsonar.java.checkstyle.reportPaths=target/checkstyle-result.xml -Dsonar.coverage.exclusions=**/configuration/**,**/exception/**,**/dto/**,**/entity/**,**/models/**,**/repository/**,**/*$*Builder*,**/BootApplication* - sonar_project_token: ${{ secrets.SONAR_TOKEN_BACKEND }} - - uses: bcgov-nr/action-test-and-analyse-java@v0.2.0 + sonar_token: ${{ secrets.SONAR_TOKEN_BACKEND }} + triggers: ('backend/') + - uses: bcgov-nr/action-test-and-analyse-java@v1.0.0 name: Legacy Coverage with: commands: | @@ -50,8 +51,9 @@ jobs: -Dsonar.coverage.jacoco.xmlReportPaths=target/coverage-reports/merged-test-report/jacoco.xml -Dsonar.java.checkstyle.reportPaths=target/checkstyle-result.xml -Dsonar.coverage.exclusions=**/configuration/**,**/exception/**,**/dto/**,**/entity/**,**/repository/**,**/*$*Builder*,**/LegacyApplication***/ApplicationConstants* - sonar_project_token: ${{ secrets.SONAR_TOKEN_LEGACY }} - - uses: bcgov-nr/action-test-and-analyse-java@v0.2.0 + sonar_token: ${{ secrets.SONAR_TOKEN_LEGACY }} + triggers: ('legacy/') + - uses: bcgov-nr/action-test-and-analyse-java@v1.0.0 name: Processor Coverage with: commands: | @@ -66,7 +68,8 @@ jobs: -Dsonar.coverage.jacoco.xmlReportPaths=target/coverage-reports/merged-test-report/jacoco.xml -Dsonar.java.checkstyle.reportPaths=target/checkstyle-result.xml -Dsonar.coverage.exclusions=**/configuration/**,**/dto/**,**/entity/**,**/repository/**,**/*$*Builder*,**/ProcessApplication***/ApplicationConstant* - sonar_project_token: ${{ secrets.SONAR_TOKEN_PROCESSOR }} + sonar_token: ${{ secrets.SONAR_TOKEN_PROCESSOR }} + triggers: ('processor/') tests-frontend: name: Frontend Unit Tests @@ -91,6 +94,7 @@ jobs: -Dsonar.organization=bcgov-sonarcloud -Dsonar.projectKey=forest-client-frontend sonar_token: ${{ secrets.SONAR_TOKEN_FRONTEND }} + triggers: ('frontend/') codeql: name: Semantic Code Analysis diff --git a/.github/workflows/pr-open.yml b/.github/workflows/pr-open.yml index 9b58ec855a..fed57cf9a9 100644 --- a/.github/workflows/pr-open.yml +++ b/.github/workflows/pr-open.yml @@ -128,7 +128,7 @@ jobs: steps: - uses: actions/checkout@v3 - - uses: bcgov-nr/action-builder-ghcr@v1.3.0 + - uses: bcgov-nr/action-builder-ghcr@v2.0.0 name: Build (${{ matrix.package }}) with: package: ${{ matrix.package }} diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index e8fbd78865..95ad7090ad 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -24,7 +24,7 @@ jobs: if: github.event_name != 'pull_request' || !github.event.pull_request.draft runs-on: ubuntu-22.04 steps: - - uses: bcgov-nr/action-test-and-analyse-java@v0.2.0 + - uses: bcgov-nr/action-test-and-analyse-java@v1.0.0 name: Backend Coverage with: commands: | @@ -39,8 +39,10 @@ jobs: -Dsonar.coverage.jacoco.xmlReportPaths=target/coverage-reports/merged-test-report/jacoco.xml -Dsonar.java.checkstyle.reportPaths=target/checkstyle-result.xml -Dsonar.coverage.exclusions=**/configuration/**,**/exception/**,**/dto/**,**/entity/**,**/models/**,**/repository/**,**/*$*Builder*,**/BootApplication* - sonar_project_token: ${{ secrets.SONAR_TOKEN_BACKEND }} - - uses: bcgov-nr/action-test-and-analyse-java@v0.2.0 + sonar_token: ${{ secrets.SONAR_TOKEN_BACKEND }} + triggers: ('backend/') + + - uses: bcgov-nr/action-test-and-analyse-java@v1.0.0 name: Legacy Coverage with: commands: | @@ -55,8 +57,10 @@ jobs: -Dsonar.coverage.jacoco.xmlReportPaths=target/coverage-reports/merged-test-report/jacoco.xml -Dsonar.java.checkstyle.reportPaths=target/checkstyle-result.xml -Dsonar.coverage.exclusions=**/configuration/**,**/exception/**,**/dto/**,**/entity/**,**/repository/**,**/*$*Builder*,**/LegacyApplication***/ApplicationConstants* - sonar_project_token: ${{ secrets.SONAR_TOKEN_LEGACY }} - - uses: bcgov-nr/action-test-and-analyse-java@v0.2.0 + sonar_token: ${{ secrets.SONAR_TOKEN_LEGACY }} + triggers: ('legacy/') + + - uses: bcgov-nr/action-test-and-analyse-java@v1.0.0 name: Processor Coverage with: commands: | @@ -71,7 +75,8 @@ jobs: -Dsonar.coverage.jacoco.xmlReportPaths=target/coverage-reports/merged-test-report/jacoco.xml -Dsonar.java.checkstyle.reportPaths=target/checkstyle-result.xml -Dsonar.coverage.exclusions=**/configuration/**,**/dto/**,**/exception/**,**/entity/**,**/repository/**,**/*$*Builder*,**/ProcessApplication***/ApplicationConstant* - sonar_project_token: ${{ secrets.SONAR_TOKEN_PROCESSOR }} + sonar_token: ${{ secrets.SONAR_TOKEN_PROCESSOR }} + triggers: ('processor/') - name: Archive CycloneDX continue-on-error: true @@ -136,6 +141,30 @@ jobs: -Dsonar.projectKey=forest-client-frontend sonar_token: ${{ secrets.SONAR_TOKEN_FRONTEND }} triggers: ('frontend/') + + - name: Frontend Unit Coverage + uses: romeovs/lcov-reporter-action@v0.3.1 + with: + title: Frontend unit Test Coverage + delete-old-comments: true + github-token: ${{ github.token }} + lcov-file: ./frontend/reports/unit/lcov.info + + - name: Frontend Component Coverage + uses: romeovs/lcov-reporter-action@v0.3.1 + with: + title: Frontend component Test Coverage + delete-old-comments: true + github-token: ${{ github.token }} + lcov-file: ./frontend/reports/component/lcov.info + + - name: Frontend E2E Coverage + uses: romeovs/lcov-reporter-action@v0.3.1 + with: + title: Frontend e2e Test Coverage + delete-old-comments: true + github-token: ${{ github.token }} + lcov-file: ./frontend/reports/e2e/lcov.info trivy: name: Repository Report diff --git a/frontend/tests/components/components/grouping/AddressGroupComponent.cy.ts b/frontend/tests/components/components/grouping/AddressGroupComponent.cy.ts index 827280a46a..de8834240a 100644 --- a/frontend/tests/components/components/grouping/AddressGroupComponent.cy.ts +++ b/frontend/tests/components/components/grouping/AddressGroupComponent.cy.ts @@ -193,12 +193,6 @@ describe("", () => { cy.wait("@getProvinces"); - /*cy.get("#postalCode_0") - .should("be.visible") - .shadow() - .find("label") - .and("include.text", "Postal code");*/ - // Wait for the option's inner, standard HTML element to exist before clicking the combo-box cy.get("#country_0") .find('cds-combo-box-item[data-id="CA"]') @@ -230,11 +224,6 @@ describe("", () => { .click() .and("have.value", "Illinois"); - /*cy.get("#postalCode_0") - .should("be.visible") - .shadow() - .find("label") - .and("include.text", "Zip code");*/ }); const streetAddressMatchingScenarios = [