Skip to content

Commit 8e99918

Browse files
authored
use tox-gh-actions (#256)
see https://github.com/ymyzk/tox-gh-actions * add CODECOV_TOKEN * add COVERALLS_REPO_TOKEN * codecov / coveralls run as part of tox * pass env to tox
1 parent 74014db commit 8e99918

File tree

3 files changed

+17
-13
lines changed

3 files changed

+17
-13
lines changed

.github/workflows/tests.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
name: Tests
22

33
on:
4-
pull_request:
54
push:
5+
branches:
6+
- master
7+
pull_request:
68

79
jobs:
810
build:
@@ -42,19 +44,17 @@ jobs:
4244
env:
4345
TOXENV: ${{ matrix.toxenv }}
4446
run: |
45-
pip install tox codecov coveralls
47+
pip install tox-gh-actions codecov coveralls
4648
pip --version
4749
tox --version
4850
- name: Script
4951
run: |
5052
tox -v
53+
env:
54+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
55+
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
5156
- name: After Failure
5257
if: ${{ failure() }}
5358
run: |
5459
more .tox/log/* | cat
5560
more .tox/*/log/* | cat
56-
- name: After Success
57-
if: ${{ success() }}
58-
run: |
59-
codecov
60-
coveralls

MANIFEST.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
include README.md
2+
include LICENSE

tox.ini

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@ norecursedirs = tests/django_example
66
[tox]
77
envlist = begin,py{py3,35,36,37,38},pytest,py38-django{lts,curr},end,quality
88

9-
[tox:travis]
10-
3.5 = py35
11-
3.6 = py36
12-
3.7 = py37,pytest
13-
3.8 = begin,py38,py38-django{lts,curr},end,quality
9+
[gh-actions]
10+
python =
11+
3.5: py35
12+
3.6: py36
13+
3.7: py37,pytest
14+
3.8: begin,py38,py38-django{lts,curr},end,quality
1415

1516
[testenv]
1617
deps =
@@ -27,7 +28,8 @@ commands =
2728
python -m xmlrunner discover -p test_xmlrunner_output
2829
codecov -e TOXENV
2930
-coveralls
30-
passenv = CI TRAVIS_BUILD_ID TRAVIS TRAVIS_BRANCH TRAVIS_JOB_NUMBER TRAVIS_PULL_REQUEST TRAVIS_JOB_ID TRAVIS_REPO_SLUG TRAVIS_COMMIT
31+
passenv = CI TRAVIS_BUILD_ID TRAVIS TRAVIS_BRANCH TRAVIS_JOB_NUMBER TRAVIS_PULL_REQUEST TRAVIS_JOB_ID TRAVIS_REPO_SLUG TRAVIS_COMMIT CODECOV_TOKEN COVERALLS_REPO_TOKEN GITHUB_ACTION GITHUB_HEAD_REF GITHUB_REF GITHUB_REPOSITORY GITHUB_RUN_ID GITHUB_SHA
32+
3133

3234
[testenv:pytest]
3335
commands = pytest

0 commit comments

Comments
 (0)