Skip to content

Commit 57e5cf9

Browse files
committed
fix codecov upload
1 parent 97cc16e commit 57e5cf9

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

.github/workflows/test_release.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,9 @@ jobs:
6262
IGNORE_COVERAGE: '-'
6363
- name: Upload Code Coverage
6464
if: github.event_name == 'release'
65-
run: |
66-
coverage combine .coverage*
67-
codecov -t {env:CODECOV_UPLOAD_TOKEN}
65+
run: tox -e upload-coverage
6866
env:
69-
CODECOV_UPLOAD_TOKEN: ${{ secrets.AWS_ACCESS_KEY_ID }}
67+
CODECOV_UPLOAD_TOKEN: ${{ secrets.CODECOV_UPLOAD_TOKEN }}
7068

7169
release:
7270
needs: [test, lint]

tox.ini

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ require-code = True
4545
passenv =
4646
AWS_*
4747
SAGEMAKER_ENDPOINT
48-
CODECOV_UPLOAD_TOKEN
4948
COVERAGE_FILE
5049
# {posargs} can be passed in by additional arguments specified when invoking tox.
5150
# Can be used to specify which tests to run, e.g.: tox -- -s
@@ -59,7 +58,6 @@ deps =
5958
pytest
6059
pytest-cov
6160
docker
62-
codecov
6361

6462
[testenv:flake8]
6563
basepython = python3
@@ -127,4 +125,13 @@ passenv =
127125
deps =
128126
PyGithub
129127
pathlib
130-
commands = python scripts/release.py {posargs}
128+
commands = python scripts/release.py {posargs}
129+
130+
[testenv:upload-coverage]
131+
basepython = python3
132+
deps =
133+
codecov
134+
passenv =
135+
CODECOV_UPLOAD_TOKEN
136+
commands =
137+
codecov -t {env:CODECOV_UPLOAD_TOKEN:}

0 commit comments

Comments
 (0)