From 90df26fe818b1f3655bb49ca07a6a4690083cd79 Mon Sep 17 00:00:00 2001 From: Sebastian Pipping Date: Tue, 8 Feb 2022 00:26:25 +0100 Subject: [PATCH] tox.ini: Take away GITHUB_ACTIONS from coveralls .. 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 --- tox.ini | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index c2db059..a6cf7e3 100644 --- a/tox.ini +++ b/tox.ini @@ -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