Skip to content

Commit

Permalink
docs(circleci): token is now required
Browse files Browse the repository at this point in the history
Looks like the Coverall docs here are out-of-date -- Coveralls no longer
supports submitting results from CircleCI without an explicit repo token
set.

Fixes #206
  • Loading branch information
TheKevJames committed Dec 3, 2019
1 parent 5c6a1e4 commit cc56f60
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
5 changes: 2 additions & 3 deletions coveralls/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ def ensure_token(self):
return

raise CoverallsException(
'Not on Travis or CircleCI. You have to provide either repo_token '
'in {} or set the COVERALLS_REPO_TOKEN env var.'.format(
'Not on TravisCI. You have to provide either repo_token in {} or '
'set the COVERALLS_REPO_TOKEN env var.'.format(
self.config_filename))

@staticmethod
Expand Down Expand Up @@ -115,7 +115,6 @@ def load_config_from_ci_environment(self):
elif os.environ.get('BUILDKITE'):
name, job, pr = self.load_config_from_buildkite()
elif os.environ.get('CIRCLECI'):
self._token_required = False
name, job, pr = self.load_config_from_circle()
elif os.environ.get('GITHUB_ACTIONS'):
name, job, pr = self.load_config_from_github()
Expand Down
2 changes: 1 addition & 1 deletion docs/usage/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ If you would like to override the service name (auto-discovered on most CI syste

If you are interested in merging the coverage results between multiple languages/projects, see our :ref:`multi-language <multilang>` documentation.

If coveralls-python is being run on CircleCI or TravisCI, it will automatically set the token for communication with coveralls.io. Otherwise, you should set the environment variable ``COVERALLS_REPO_TOKEN``, which can be found on the dashboard for your project in coveralls.io::
If coveralls-python is being run on TravisCI, it will automatically set the token for communication with coveralls.io. Otherwise, you should set the environment variable ``COVERALLS_REPO_TOKEN``, which can be found on the dashboard for your project in coveralls.io::

COVERALLS_REPO_TOKEN=mV2Jajb8y3c6AFlcVNagHO20fiZNkXPVy coveralls

Expand Down
2 changes: 1 addition & 1 deletion docs/usage/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Usage

This package works with any CI environment. Special handling has been included for some CI service providers, but coveralls-python can run anywhere.

To get started with coveralls-python, make sure to `add your repo`_ on the coveralls.io website. If you will be using coveralls-python on CircleCI or TravisCI, you're done here -- otherwise, take note of the "repo token" in the coveralls.io dashboard.
To get started with coveralls-python, make sure to `add your repo`_ on the coveralls.io website. If you will be using coveralls-python on TravisCI, you're done here -- otherwise, take note of the "repo token" in the coveralls.io dashboard.

After that, its as simple as installing coveralls-python, collecting coverage results, and sending them to coveralls.io.

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 @@ -65,8 +65,8 @@ def test_misconfigured(self):
Coveralls()

assert str(excinfo.value) == (
'Not on Travis or CircleCI. You have to provide either repo_token '
'in .coveralls.mock or set the COVERALLS_REPO_TOKEN env var.')
'Not on TravisCI. You have to provide either repo_token in '
'.coveralls.mock or set the COVERALLS_REPO_TOKEN env var.')

@mock.patch.dict(os.environ, {'APPVEYOR': 'True',
'APPVEYOR_BUILD_ID': '1234567',
Expand Down

0 comments on commit cc56f60

Please sign in to comment.