File tree Expand file tree Collapse file tree 3 files changed +78
-12
lines changed
Expand file tree Collapse file tree 3 files changed +78
-12
lines changed Original file line number Diff line number Diff line change 1+ # Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0
2+ # For details: https://github.com/nedbat/coveragepy/blob/master/NOTICE.txt
3+
4+ name : " Tests"
5+
6+ on :
7+ push :
8+ pull_request :
9+ workflow_dispatch :
10+
11+ defaults :
12+ run :
13+ shell : bash
14+
15+ jobs :
16+ tests :
17+ name : " Python ${{ matrix.python-version }} on ${{ matrix.os }}"
18+ runs-on : " ${{ matrix.os }}"
19+
20+ strategy :
21+ matrix :
22+ os :
23+ - ubuntu-latest
24+ - macos-latest
25+ - windows-latest
26+ python-version :
27+ # When changing this list, be sure to check the [gh-actions] list in
28+ # tox.ini so that tox will run properly.
29+ - " 2.7"
30+ - " 3.6"
31+ - " 3.7"
32+ - " 3.8"
33+ - " 3.9"
34+ exclude :
35+ # Windows 2.7 doesn't work because Microsoft removed stuff we needed.
36+ - os : windows-latest
37+ python-version : " 2.7"
38+ fail-fast : false
39+
40+ steps :
41+ - name : " Check out the repo"
42+ uses : " actions/checkout@v2"
43+
44+ - name : " Set up Python"
45+ uses : " actions/setup-python@v2"
46+ with :
47+ python-version : " ${{ matrix.python-version }}"
48+
49+ - name : " Install dependencies"
50+ run : |
51+ set -xe
52+ python -VV
53+ python -m site
54+ python -m pip install -r requirements.txt
55+ python -m pip install tox-gh-actions
56+
57+ - name : " Run tox for ${{ matrix.python-version }}"
58+ run : |
59+ # GitHub Actions on Windows sets TEMP to a shortname, and HOME to a
60+ # longname. Eventually, filename comparisons fail because of the
61+ # difference. Fix $TEMP.
62+ echo $TEMP
63+ if [ "$RUNNER_OS" == "Windows" ]; then
64+ export TMP=$HOME\\AppData\\Local\\Temp
65+ export TEMP=$HOME\\AppData\\Local\\Temp
66+ fi
67+ echo $TEMP
68+ python -m tox
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ envlist =
2323
2424[testenv]
2525deps =
26+ pytest
2627 unittest-mixins ==1.6
2728 django18: Django>=1.8,<1.9
2829 django19: Django>=1.9,<1.10
3839
3940commands =
4041 python -c " import tests.banner"
41- python -m unittest {posargs:discover -b }
42+ python -m pytest {posargs}
4243
4344usedevelop = True
4445
@@ -70,3 +71,11 @@ deps =
7071
7172commands =
7273 rst2html.py --strict README.rst /tmp/django_coverage_plugin_README.html
74+
75+ [gh-actions]
76+ python =
77+ 2.7: py27
78+ 3.6: py36
79+ 3.7: py37
80+ 3.8: py38
81+ 3.9: py39
You can’t perform that action at this time.
0 commit comments