diff --git a/.github/workflows/go_test.yml b/.github/workflows/go_test.yml index 8918c53b..4ed35d3d 100644 --- a/.github/workflows/go_test.yml +++ b/.github/workflows/go_test.yml @@ -18,6 +18,7 @@ jobs: runs-on: ${{matrix.platform}} env: LLVL: trace + coverage: ${{ matrix.platform == 'ubuntu-latest' && github.repository == 'dedis/dela' }} steps: - name: Check out code into the Go module directory uses: actions/checkout@v4 @@ -30,17 +31,17 @@ jobs: - name: Test without coverage env: CRY_LVL: "warn" - if: matrix.platform == 'macos-latest' || matrix.platform == 'windows-latest' + if: ${{ env.coverage == 'false' }} run: make test - name: Test with coverage env: CRY_LVL: "warn" - if: matrix.platform == 'ubuntu-latest' + if: ${{ env.coverage == 'true' }} run: make coverage - name: Sonarcloud scan - if: matrix.platform == 'ubuntu-latest' + if: ${{ env.coverage == 'true' }} uses: sonarsource/sonarcloud-github-action@master with: args: > @@ -53,7 +54,7 @@ jobs: SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - name: Send coverage - if: matrix.platform == 'ubuntu-latest' + if: ${{ env.coverage == 'true' }} uses: shogo82148/actions-goveralls@v1 with: path-to-profile: profile.cov