From 7761e375225a2cb2aa0254cfb4dd5bec91c8bb4a Mon Sep 17 00:00:00 2001 From: Oliver Gugger Date: Fri, 28 Feb 2025 11:14:36 +0100 Subject: [PATCH] GitHub: remove generated files from coverage --- .github/workflows/main.yml | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1e119afe0..913b4458e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -259,12 +259,16 @@ jobs: - name: run ${{ matrix.unit_type }} run: make ${{ matrix.unit_type }} + - name: Clean coverage + run: grep -Ev '(\.pb\.go|\.pb\.json\.go|\.pb\.gw\.go)' coverage.txt > coverage-norpc.txt + if: matrix.unit_type == 'unit-cover' + - name: Send coverage uses: coverallsapp/github-action@v2 if: matrix.unit_type == 'unit-cover' continue-on-error: true with: - file: coverage.txt + file: coverage-norpc.txt flag-name: 'unit' format: 'golang' parallel: true @@ -315,12 +319,16 @@ jobs: - name: run ${{ matrix.name }} run: make itest-parallel tranches=${{ env.TRANCHES }} ${{ matrix.args }} shuffleseed=${{ github.run_id }}${{ strategy.job-index }} + - name: Clean coverage + run: grep -Ev '(\.pb\.go|\.pb\.json\.go|\.pb\.gw\.go)' coverage.txt > coverage-norpc.txt + if: ${{ contains(matrix.args, 'cover=1') }} + - name: Send coverage if: ${{ contains(matrix.args, 'cover=1') }} continue-on-error: true uses: coverallsapp/github-action@v2 with: - file: coverage.txt + file: coverage-norpc.txt flag-name: 'itest-${{ matrix.name }}' format: 'golang' parallel: true @@ -384,12 +392,16 @@ jobs: - name: run ${{ matrix.name }} run: make itest-parallel tranches=${{ env.SMALL_TRANCHES }} ${{ matrix.args }} shuffleseed=${{ github.run_id }}${{ strategy.job-index }} + - name: Clean coverage + run: grep -Ev '(\.pb\.go|\.pb\.json\.go|\.pb\.gw\.go)' coverage.txt > coverage-norpc.txt + if: ${{ contains(matrix.args, 'cover=1') }} + - name: Send coverage if: ${{ contains(matrix.args, 'cover=1') }} continue-on-error: true uses: coverallsapp/github-action@v2 with: - file: coverage.txt + file: coverage-norpc.txt flag-name: 'itest-${{ matrix.name }}' format: 'golang' parallel: true