Skip to content

Commit c338cab

Browse files
ArturKlauserTheKevJames
authored andcommitted
fix(github): rename service to github-actions (#209)
The coveralls API refuses to accept submissions with `service=github`, but accepts submissions with `service=github-actions`.
1 parent 7c6c9ed commit c338cab

File tree

5 files changed

+6
-7
lines changed

5 files changed

+6
-7
lines changed

coveralls/api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def load_config_from_github():
8888
pr = None
8989
if os.environ.get('GITHUB_REF', '').startswith('refs/pull/'):
9090
pr = os.environ.get('GITHUB_REF', '//').split('/')[2]
91-
return 'github', None, pr
91+
return 'github-actions', None, pr
9292

9393
@staticmethod
9494
def load_config_from_jenkins():

docs/usage/configuration.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Configuration
44
=============
55

6-
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.
6+
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.
77

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

docs/usage/tox.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ All variables:
5656
- ``CIRCLE_BRANCH``
5757
- ``CI_PULL_REQUEST``
5858

59-
Github
60-
---------
59+
Github Actions
60+
--------------
6161
::
6262

6363
passenv = GITHUB_*

tests/api/configuration_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ def test_circleci_no_config(self):
116116
clear=True)
117117
def test_github_no_config(self):
118118
cover = Coveralls(repo_token='xxx')
119-
assert cover.config['service_name'] == 'github'
119+
assert cover.config['service_name'] == 'github-actions'
120120
assert cover.config['service_pull_request'] == '1234'
121121
assert 'service_job_id' not in cover.config
122122

@@ -126,7 +126,7 @@ def test_github_no_config(self):
126126
clear=True)
127127
def test_github_no_config_no_pr(self):
128128
cover = Coveralls(repo_token='xxx')
129-
assert cover.config['service_name'] == 'github'
129+
assert cover.config['service_name'] == 'github-actions'
130130
assert 'service_pull_request' not in cover.config
131131
assert 'service_job_id' not in cover.config
132132

tests/git_test.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,6 @@ class GitInfoTestBranch(GitTest):
128128
}, clear=True)
129129
def test_gitinfo_github_pr(self):
130130
git_info = coveralls.git.git_info()
131-
print('git_info', git_info)
132131
assert git_info['git']['branch'] == 'fixup-branch'
133132

134133
@mock.patch.dict(os.environ, {

0 commit comments

Comments
 (0)