Skip to content

Commit

Permalink
fix(github): rename service to github-actions (#209)
Browse files Browse the repository at this point in the history
The coveralls API refuses to accept submissions with `service=github`, but accepts
submissions with `service=github-actions`.
  • Loading branch information
ArturKlauser authored and TheKevJames committed Dec 3, 2019
1 parent 7c6c9ed commit c338cab
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion coveralls/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def load_config_from_github():
pr = None
if os.environ.get('GITHUB_REF', '').startswith('refs/pull/'):
pr = os.environ.get('GITHUB_REF', '//').split('/')[2]
return 'github', None, pr
return 'github-actions', None, pr

@staticmethod
def load_config_from_jenkins():
Expand Down
2 changes: 1 addition & 1 deletion docs/usage/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Configuration
=============

coveralls-python often works without any outside configuration by examining the environment it is being run in. Special handling has been added for AppVeyor, BuildKite, CircleCI, Github, Jenkins, and TravisCI to make coveralls-python as close to "plug and play" as possible.
coveralls-python often works without any outside configuration by examining the environment it is being run in. Special handling has been added for AppVeyor, BuildKite, CircleCI, Github Actions, Jenkins, and TravisCI to make coveralls-python as close to "plug and play" as possible.

Most often, you will simply need to run coveralls-python with no additional options after you have run your coverage suite::

Expand Down
4 changes: 2 additions & 2 deletions docs/usage/tox.rst
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ All variables:
- ``CIRCLE_BRANCH``
- ``CI_PULL_REQUEST``

Github
---------
Github Actions
--------------
::

passenv = GITHUB_*
Expand Down
4 changes: 2 additions & 2 deletions tests/api/configuration_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def test_circleci_no_config(self):
clear=True)
def test_github_no_config(self):
cover = Coveralls(repo_token='xxx')
assert cover.config['service_name'] == 'github'
assert cover.config['service_name'] == 'github-actions'
assert cover.config['service_pull_request'] == '1234'
assert 'service_job_id' not in cover.config

Expand All @@ -126,7 +126,7 @@ def test_github_no_config(self):
clear=True)
def test_github_no_config_no_pr(self):
cover = Coveralls(repo_token='xxx')
assert cover.config['service_name'] == 'github'
assert cover.config['service_name'] == 'github-actions'
assert 'service_pull_request' not in cover.config
assert 'service_job_id' not in cover.config

Expand Down
1 change: 0 additions & 1 deletion tests/git_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@ class GitInfoTestBranch(GitTest):
}, clear=True)
def test_gitinfo_github_pr(self):
git_info = coveralls.git.git_info()
print('git_info', git_info)
assert git_info['git']['branch'] == 'fixup-branch'

@mock.patch.dict(os.environ, {
Expand Down

0 comments on commit c338cab

Please sign in to comment.