Skip to content

Commit 7761e37

Browse files
committed
GitHub: remove generated files from coverage
1 parent 124137e commit 7761e37

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

.github/workflows/main.yml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -259,12 +259,16 @@ jobs:
259259
- name: run ${{ matrix.unit_type }}
260260
run: make ${{ matrix.unit_type }}
261261

262+
- name: Clean coverage
263+
run: grep -Ev '(\.pb\.go|\.pb\.json\.go|\.pb\.gw\.go)' coverage.txt > coverage-norpc.txt
264+
if: matrix.unit_type == 'unit-cover'
265+
262266
- name: Send coverage
263267
uses: coverallsapp/github-action@v2
264268
if: matrix.unit_type == 'unit-cover'
265269
continue-on-error: true
266270
with:
267-
file: coverage.txt
271+
file: coverage-norpc.txt
268272
flag-name: 'unit'
269273
format: 'golang'
270274
parallel: true
@@ -315,12 +319,16 @@ jobs:
315319
- name: run ${{ matrix.name }}
316320
run: make itest-parallel tranches=${{ env.TRANCHES }} ${{ matrix.args }} shuffleseed=${{ github.run_id }}${{ strategy.job-index }}
317321

322+
- name: Clean coverage
323+
run: grep -Ev '(\.pb\.go|\.pb\.json\.go|\.pb\.gw\.go)' coverage.txt > coverage-norpc.txt
324+
if: ${{ contains(matrix.args, 'cover=1') }}
325+
318326
- name: Send coverage
319327
if: ${{ contains(matrix.args, 'cover=1') }}
320328
continue-on-error: true
321329
uses: coverallsapp/github-action@v2
322330
with:
323-
file: coverage.txt
331+
file: coverage-norpc.txt
324332
flag-name: 'itest-${{ matrix.name }}'
325333
format: 'golang'
326334
parallel: true
@@ -384,12 +392,16 @@ jobs:
384392
- name: run ${{ matrix.name }}
385393
run: make itest-parallel tranches=${{ env.SMALL_TRANCHES }} ${{ matrix.args }} shuffleseed=${{ github.run_id }}${{ strategy.job-index }}
386394

395+
- name: Clean coverage
396+
run: grep -Ev '(\.pb\.go|\.pb\.json\.go|\.pb\.gw\.go)' coverage.txt > coverage-norpc.txt
397+
if: ${{ contains(matrix.args, 'cover=1') }}
398+
387399
- name: Send coverage
388400
if: ${{ contains(matrix.args, 'cover=1') }}
389401
continue-on-error: true
390402
uses: coverallsapp/github-action@v2
391403
with:
392-
file: coverage.txt
404+
file: coverage-norpc.txt
393405
flag-name: 'itest-${{ matrix.name }}'
394406
format: 'golang'
395407
parallel: true

0 commit comments

Comments
 (0)