stripe/stripe-python

CI: code coverage is not reported to Coveralls.io

antonblr opened this issue · 1 comments

Describe the bug

This is GitHub Action CI related issue not a stripe-python package bug.

Code coverage reports have stopped since #888 (last coveralls.io/github/stripe/stripe-python report is dated as of October, 2022).

Is COVERALLS_REPO_TOKEN secret set for the repo ?

- name: Calculate and publish coverage
  run: make coveralls
  if: env.COVERALLS_REPO_TOKEN && matrix.python-version == '3.10'  # <-- is COVERALLS_REPO_TOKEN set in repo secrets ? 
  env:
    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
    COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}  # <-- might be needed here as well?

It might be necessary to inject it to the step.env as well (as shown above ^)

Also, I've noticed that make coveralls essentially runs all the tests again. Perhaps you can grab coverage results from Test with pytest (3.10) step (make ci-tests also runs coverage, but via pytest plugin)? Or, skip Test with pytest step for 3.10 altogether.

To Reproduce

Check any recent GitHub Action CI runs, e.g. https://github.com/stripe/stripe-python/actions/runs/4632402230/jobs/8196419932
Calculate and publish coverage step is always skipped.

Expected behavior

GitHub Action CI Calculate and publish coverage step runs for python 3.10.

Code snippets

No response

OS

n/a

Language version

n/a

Library version

n/a

API version

n/a

Additional context

No response

Nice catch, @antonblr! We decided to keep running tests twice to keep the workflow simpler.