From 7117de73fdbfe86715bfb36faa431a45161af456 Mon Sep 17 00:00:00 2001 From: jbsv <90860471+jbsv@users.noreply.github.com> Date: Wed, 22 Feb 2023 16:35:42 +0100 Subject: [PATCH 1/2] fix coverage in CI --- .github/workflows/test_on_pr.yml | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test_on_pr.yml b/.github/workflows/test_on_pr.yml index 8bcbab55e..41bd37160 100644 --- a/.github/workflows/test_on_pr.yml +++ b/.github/workflows/test_on_pr.yml @@ -52,12 +52,12 @@ jobs: - name: Test without coverage if: matrix.platform == 'macos-latest' || matrix.platform == 'windows-latest' - run: make test + run: go test ./... - name: Test with coverage if: matrix.platform == 'ubuntu-latest' - run: make coverage - + run: go test -json -covermode=count -coverprofile=profile.cov ./... > report.json + - name: SonarCloud scan if: matrix.platform == 'ubuntu-latest' uses: sonarsource/sonarcloud-github-action@master @@ -76,3 +76,19 @@ jobs: -Dsonar.c.file.suffixes=- -Dsonar.cpp.file.suffixes=- -Dsonar.objc.file.suffixes=- + + - name: Send coverage + if: matrix.platform == 'ubuntu-latest' + uses: shogo82148/actions-goveralls@v1 + with: + path-to-profile: profile.cov + parallel: true + + # notifies that all test jobs are finished. + finish: + needs: test + runs-on: ubuntu-latest + steps: + - uses: shogo82148/actions-goveralls@v1 + with: + parallel-finished: true From 5c6432963bbdf4a4a1f738976938334d00c87745 Mon Sep 17 00:00:00 2001 From: jbsv <90860471+jbsv@users.noreply.github.com> Date: Thu, 23 Feb 2023 11:32:04 +0100 Subject: [PATCH 2/2] remove goverall for PR --- .github/workflows/test_on_pr.yml | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/.github/workflows/test_on_pr.yml b/.github/workflows/test_on_pr.yml index 41bd37160..2725036e3 100644 --- a/.github/workflows/test_on_pr.yml +++ b/.github/workflows/test_on_pr.yml @@ -52,11 +52,11 @@ jobs: - name: Test without coverage if: matrix.platform == 'macos-latest' || matrix.platform == 'windows-latest' - run: go test ./... + run: make test - name: Test with coverage if: matrix.platform == 'ubuntu-latest' - run: go test -json -covermode=count -coverprofile=profile.cov ./... > report.json + run: make coverage - name: SonarCloud scan if: matrix.platform == 'ubuntu-latest' @@ -77,18 +77,3 @@ jobs: -Dsonar.cpp.file.suffixes=- -Dsonar.objc.file.suffixes=- - - name: Send coverage - if: matrix.platform == 'ubuntu-latest' - uses: shogo82148/actions-goveralls@v1 - with: - path-to-profile: profile.cov - parallel: true - - # notifies that all test jobs are finished. - finish: - needs: test - runs-on: ubuntu-latest - steps: - - uses: shogo82148/actions-goveralls@v1 - with: - parallel-finished: true