Commit 6660aba
committed
ci: wire GITHUB_TOKEN + BUILD_NUMBER for Coveralls (github-actions)
The nbaztec coveralls-jacoco v1.2.20 plugin has a quirky GitHub Actions
detection path. Reading its source (ServiceInfoParser.kt):
- If GITHUB_ACTIONS is set but GITHUB_TOKEN is not, it emits
service_name="github-actions" — which the Coveralls API does not
recognize as a first-class service, so PR comments and branch
correlation silently no-op.
- When BOTH GITHUB_ACTIONS and GITHUB_TOKEN are set, it switches to
service_name="github" (the canonical name).
- service_job_id is read from BUILD_NUMBER (Jenkins-style), not
GITHUB_RUN_ID — so we map github.run_id onto BUILD_NUMBER explicitly.
- Branch is read from CI_BRANCH; github.head_ref is used so PR builds
report the source branch instead of "<num>/merge".
Verified locally by running coverallsJacoco with the production token
plus a CircleCI-shaped env block (the plugin's CircleCI branch is the
best-supported one) — Coveralls returned OK and the build appeared in
the dashboard.
Also re-adds coverallsRequest = file(...) so the request payload is
written to build/coveralls-request.json. The workflow's "Push coverage
to Coveralls" step already cats this file, which makes future
regressions diagnosable from the CI log alone.
Assisted-By: Claude Code1 parent 130bfea commit 6660aba
2 files changed
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
467 | 467 | | |
468 | 468 | | |
469 | 469 | | |
| 470 | + | |
| 471 | + | |
470 | 472 | | |
471 | 473 | | |
472 | 474 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
206 | 206 | | |
207 | 207 | | |
208 | 208 | | |
| 209 | + | |
209 | 210 | | |
210 | 211 | | |
211 | 212 | | |
| |||
0 commit comments