Skip to content

ci: switch coveralls to repo token auth - #430

Closed
BeiBaiNian wants to merge 1 commit into
apache:masterfrom
BeiBaiNian:ci/coveralls-repo-token
Closed

ci: switch coveralls to repo token auth#430
BeiBaiNian wants to merge 1 commit into
apache:masterfrom
BeiBaiNian:ci/coveralls-repo-token

Conversation

@BeiBaiNian

Copy link
Copy Markdown

Summary

Fix the coveralls 422 error that makes all test jobs of the build workflow fail. After the repo moved from casbin/pycasbin to apache/casbin-pycasbin, the coveralls GitHub Actions integration (service_name=github) can no longer match CI jobs to the repository, so every coverage upload fails with 422 Couldn't find a repository matching this job (tests themselves all pass).

Switch to the officially recommended repo-token method:

  • Upload step now runs coveralls --service-name=github-actions with COVERALLS_REPO_TOKEN
  • The coveralls --finish step uses the same token, replacing GITHUB_TOKEN

Changes

  • .github/workflows/build.yml
    • Upload coverage step: run: coveralls --service-name=github-actions; env GITHUB_TOKEN replaced with COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
    • Finish step (coveralls --finish): env GITHUB_TOKEN replaced with COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}

Verification

  • Repo-token method verified against coveralls.io before submitting: a POST to https://coveralls.io/api/v1/jobs with the repo token returned 200 {"message":"Job ##1.1","url":"https://coveralls.io/jobs/185704267"} — coveralls accepted the upload.
  • YAML syntax and workflow structure validated locally.

Note for maintainers

This PR requires the repository secret COVERALLS_REPO_TOKEN , otherwise CI cannot pass.

@hsluoyz hsluoyz closed this Aug 5, 2026
@BeiBaiNian
BeiBaiNian deleted the ci/coveralls-repo-token branch August 6, 2026 03:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants