Skip to content

Commit

Permalink
tox.ini: Take away GITHUB_ACTIONS from coveralls
Browse files Browse the repository at this point in the history
.. so that it stops complaining about missing
variable GITHUB_TOKEN ..

> Running on Github Actions but GITHUB_TOKEN is not set.
> Add "env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}" to
> your step config.

(which may have write access) and that we stopped
sharing with coveralls in PR #97.

The related code checks for presence of variable
GITHUB_ACTIONS so we we take that variable
from coveralls-python.

Rather than excluding variable GITHUB_ACTIONS,
we include all other GITHUB_* variables used by
coveralls-python.  The list was derive like this:

$ git clone --depth 1 https://github.com/TheKevJames/coveralls-python
$ cd coveralls-python/
$ git grep -oh "GITHUB_[^ ':\`*]\+" | sort -u
GITHUB_ACTIONS
GITHUB_HEAD_REF
GITHUB_REF
GITHUB_REPOSITORY
GITHUB_RUN_ID
GITHUB_RUN_NUMBER
GITHUB_SHA
GITHUB_TOKEN
  • Loading branch information
hartwork committed Feb 7, 2022
1 parent bceaa5a commit 90df26f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion tox.ini
Expand Up @@ -33,7 +33,14 @@ commands =
coverage report -m
bash -c 'set -x; [[ $\{GITHUB_ACTIONS:-false\} = false ]] || coveralls'
setenv = {[base]setenv}
# not GITHUB_ACTIONS!
passenv =
COVERALLS_REPO_TOKEN
GITHUB_*
GITHUB_HEAD_REF
GITHUB_REF
GITHUB_REPOSITORY
GITHUB_RUN_ID
GITHUB_RUN_NUMBER
GITHUB_SHA
GITHUB_TOKEN
allowlist_externals = bash

0 comments on commit 90df26f

Please sign in to comment.