Skip to content

Commit 7b9e6ef

Browse files
authored
ci: Fix Coveralls Bot from spamming coverage info (#1205)
Before this PR, the Coveralls Bot's been spamming the Coverage info as PR comments. It's assumed, the bot's doing it because we have a Coveralls upload step for every package. This PR tries to fix this by using the built-in "parallel" upload job feature by Coveralls itself. For now, this seems to have fixed the problem (as seen in the PR checks themselves). This only creates one minor drawback: There are now 6 instead of only one check in the list. --- Additionally, this PR changes the tests execution step (inside `github-ci.yml`) from "_npm run unit_" back to "_npm run coverage_". This is done because `coverage.yml` only checks inside "packages/" and not "internal/".
1 parent 49a3a11 commit 7b9e6ef

File tree

2 files changed

+26
-40
lines changed

2 files changed

+26
-40
lines changed

.github/workflows/coverage.yml

Lines changed: 25 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Coverage Reporting
1+
name: Coverage
22

33
on:
44
push:
@@ -14,8 +14,17 @@ permissions:
1414

1515
jobs:
1616
coverage:
17-
name: Check coverage and report to Coveralls
17+
name: Check and Upload (packages/${{ matrix.package }})
1818
runs-on: ubuntu-24.04
19+
strategy:
20+
matrix:
21+
package:
22+
- builder
23+
- cli
24+
- fs
25+
- logger
26+
- project
27+
- server
1928
steps:
2029

2130
- uses: actions/checkout@v5
@@ -29,46 +38,23 @@ jobs:
2938
run: npm ci
3039

3140
- name: Check coverage
41+
working-directory: packages/${{ matrix.package }}
3242
run: npm run coverage
3343

34-
- name: Send report to Coveralls for package @ui5/builder
44+
- name: Send parallel reports to Coveralls for all packages
3545
uses: coverallsapp/[email protected]
3646
continue-on-error: true # Do not fail the job if coverage reporting fails (e.g. service is down)
3747
with:
38-
file: packages/builder/coverage/lcov.info
39-
base-path: packages/builder
48+
parallel: true
49+
base-path: packages/${{ matrix.package }}
50+
flag-name: ${{ matrix.package }}
4051

41-
- name: Send report to Coveralls for package @ui5/cli
42-
uses: coverallsapp/[email protected]
43-
continue-on-error: true # Do not fail the job if coverage reporting fails (e.g. service is down)
44-
with:
45-
file: packages/cli/coverage/lcov.info
46-
base-path: packages/cli
47-
48-
- name: Send report to Coveralls for package @ui5/fs
49-
uses: coverallsapp/[email protected]
50-
continue-on-error: true # Do not fail the job if coverage reporting fails (e.g. service is down)
51-
with:
52-
file: packages/fs/coverage/lcov.info
53-
base-path: packages/fs
54-
55-
- name: Send report to Coveralls for package @ui5/logger
56-
uses: coverallsapp/[email protected]
57-
continue-on-error: true # Do not fail the job if coverage reporting fails (e.g. service is down)
58-
with:
59-
file: packages/logger/coverage/lcov.info
60-
base-path: packages/logger
61-
62-
- name: Send report to Coveralls for package @ui5/project
63-
uses: coverallsapp/[email protected]
64-
continue-on-error: true # Do not fail the job if coverage reporting fails (e.g. service is down)
65-
with:
66-
file: packages/project/coverage/lcov.info
67-
base-path: packages/project
68-
69-
- name: Send report to Coveralls for package @ui5/server
70-
uses: coverallsapp/[email protected]
71-
continue-on-error: true # Do not fail the job if coverage reporting fails (e.g. service is down)
72-
with:
73-
file: packages/server/coverage/lcov.info
74-
base-path: packages/server
52+
finish:
53+
needs: coverage
54+
if: ${{ always() }}
55+
runs-on: ubuntu-24.04
56+
steps:
57+
- name: Close parallel build
58+
uses: coverallsapp/[email protected]
59+
with:
60+
parallel-finished: true

.github/workflows/github-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
run: npm run depcheck
3838

3939
- name: Run unit tests
40-
run: npm run unit
40+
run: npm run coverage
4141

4242
- name: Generate JSDoc documentation
4343
working-directory: internal/documentation

0 commit comments

Comments
 (0)