From 204b89ede87ea72643ffc3d3e404f84b52a52db9 Mon Sep 17 00:00:00 2001 From: Paulo Gomes da Cruz Junior Date: Wed, 29 Nov 2023 10:44:37 -0800 Subject: [PATCH 1/5] chore: updating coverage report for frontend --- .github/workflows/unit-tests.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index e8fbd78865..e011763d0c 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -136,6 +136,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 From 4e63a4ca7bd7abe17b00910775d771115cbfebf2 Mon Sep 17 00:00:00 2001 From: Paulo Gomes da Cruz Junior Date: Wed, 29 Nov 2023 10:57:52 -0800 Subject: [PATCH 2/5] ci: updating ci configuration --- .github/workflows/unit-tests.yml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index e011763d0c..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 From bcbc6ac85d66db28979614c8f45f690d3b050a8c Mon Sep 17 00:00:00 2001 From: Paulo Gomes da Cruz Junior Date: Wed, 29 Nov 2023 10:58:01 -0800 Subject: [PATCH 3/5] chore: removing code comment --- .../components/grouping/AddressGroupComponent.cy.ts | 11 ----------- 1 file changed, 11 deletions(-) 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 = [ From e508959bbdc5b9b2b9d567b7b35dec8fd3109140 Mon Sep 17 00:00:00 2001 From: Paulo Gomes da Cruz Junior Date: Wed, 29 Nov 2023 11:12:45 -0800 Subject: [PATCH 4/5] chore(deps): updating action version --- .github/workflows/pr-open.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 }} From 9f259573d40ae4f4399d9361a5237a9253f71b81 Mon Sep 17 00:00:00 2001 From: Paulo Gomes da Cruz Junior Date: Wed, 29 Nov 2023 11:44:24 -0800 Subject: [PATCH 5/5] chore: updating merge main --- .github/workflows/merge-main.yml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) 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