Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add coveralls token to GH action config. #1020

Merged
merged 12 commits into from
Dec 13, 2022

Conversation

ntouran
Copy link
Member

@ntouran ntouran commented Dec 12, 2022

This secret is obtained from the coveralls page and loaded using the github secrets feature.

We realized we needed this when coveralls started giving an error message that said we needed
to include this env variable.

The error message we saw was:

  Wrote HTML report to htmlcov/index.html
  report: commands[2]> coveralls --service=github
  Not on TravisCI. You have to provide either repo_token in .coveralls.yml or set the COVERALLS_REPO_TOKEN env var.
  Traceback (most recent call last):
    File "/home/runner/work/armi/armi/.tox/report/lib/python3.10/site-packages/coveralls/cli.py", line 64, in main
      coverallz = Coveralls(token_required,
    File "/home/runner/work/armi/armi/.tox/report/lib/python3.10/site-packages/coveralls/api.py", line 49, in __init__
      self.ensure_token()
    File "/home/runner/work/armi/armi/.tox/report/lib/python3.10/site-packages/coveralls/api.py", line 61, in ensure_token
      raise CoverallsException(
  coveralls.exception.CoverallsException: Not on TravisCI. You have to provide either repo_token in .coveralls.yml or set the COVERALLS_REPO_TOKEN env var.
  report: exit 1 (0.16 seconds) /home/runner/work/armi/armi> coveralls --service=github pid=4199
    cov2: OK (978.37=setup[45.03]+cmd[933.23,0.11] seconds)
    report: FAIL code 1 (13.47=setup[3.72]+cmd[2.25,7.34,0.16] seconds)
    evaluation failed :( (991.99 seconds)
  Error: Process completed with exit code 255.

Fixes #1017

This secret is obtained from the coveralls page and loaded
using the github secrets feature.
@ntouran ntouran requested a review from john-science December 12, 2022 16:14
@ntouran
Copy link
Member Author

ntouran commented Dec 12, 2022

This got farther, but failed with a new error:

cov2: OK ✔ in 23 minutes 4.73 seconds
report: failed with pass_env values cannot contain whitespace, use comma to have multiple values in a single line, invalid values found 'TOXENV CI GITHUB_*'
  cov2: OK (1384.73=setup[54.34]+cmd[1330.25,0.14] seconds)
  report: FAIL code 1 (0.00 seconds)
  evaluation failed :( (1384.93 seconds)
Error: Process completed with exit code 255.

@john-science
Copy link
Member

I added a commit to try and use the Coveralls.io Action. Hopefully that works.

@john-science john-science merged commit aaaf7a5 into main Dec 13, 2022
@john-science john-science deleted the ntouran/1017-coveralls-token branch December 13, 2022 13:47
@john-science
Copy link
Member

@ntouran After much experimentation, this appears to be working. Though... I had a laughable number of commits to get this working.

Not only did I need to use a Coveralls.io Workflow, I had to add a second coveragepy-lcov workflow, because coveralls.io no longer accepts .coverage.cov file types that Python outputs.

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.

Our coverage checking config with coveralls.io is broken
3 participants