11name : Test
22
3+ # If a pull-request is pushed then cancel all previously running jobs related
4+ # to that pull-request
5+ concurrency :
6+ group : ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
7+ cancel-in-progress : true
8+
39on :
410 push :
511 branches :
6- - master
12+ - main
713 pull_request :
814 branches :
15+ - main
916 - master
1017
1118env :
1219 PY_COLORS : 1
1320
1421jobs :
1522 unit :
16- runs-on : ubuntu-20.04
23+ runs-on : ${{ matrix.os }}
1724 strategy :
1825 matrix :
19- include :
20- - python-version : 3.6
21- toxenv : py36
22- - python-version : 3.7
26+ os : [ubuntu-latest]
27+ python :
28+ - version : " 3.7"
2329 toxenv : py37
24- - python- version : 3.8
30+ - version : " 3.8"
2531 toxenv : py38
26- - python- version : 3.9
32+ - version : " 3.9"
2733 toxenv : py39
34+ - version : " 3.10"
35+ toxenv : py310,smoke
36+ - version : ' 3.11.0-alpha - 3.11' # SemVer's version range syntax
37+ toxenv : py311,smoke
38+ include :
39+ - os : macos-latest
40+ python :
41+ version : " 3.10"
42+ toxenv : py310,smoke
43+ - os : windows-latest
44+ python :
45+ version : " 3.10"
46+ toxenv : py310,smoke
2847 steps :
2948 - uses : actions/checkout@v2
30- - name : Set up Python ${{ matrix.python- version }}
49+ - name : Set up Python ${{ matrix.python. version }}
3150 uses : actions/setup-python@v2
3251 with :
33- python-version : ${{ matrix.python- version }}
52+ python-version : ${{ matrix.python. version }}
3453 - name : Install dependencies
35- run : pip install tox pytest-github-actions-annotate-failures
54+ run : pip3 install tox pytest-github-actions-annotate-failures
3655 - name : Run tests
3756 env :
38- TOXENV : ${{ matrix.toxenv }}
57+ TOXENV : ${{ matrix.python. toxenv }}
3958 run : tox
4059
4160 functional :
@@ -48,15 +67,15 @@ jobs:
4867 - name : Set up Python
4968 uses : actions/setup-python@v2
5069 with :
51- python-version : 3.9
70+ python-version : " 3.10 "
5271 - name : Install dependencies
5372 run : pip install tox pytest-github-actions-annotate-failures
5473 - name : Run tests
5574 env :
5675 TOXENV : ${{ matrix.toxenv }}
5776 run : tox
5877 - name : Upload codecov coverage
59- uses : codecov/codecov-action@v1
78+ uses : codecov/codecov-action@v2
6079 with :
6180 files : ./coverage.xml
6281 flags : ${{ matrix.toxenv }}
6988 - name : Set up Python ${{ matrix.python-version }}
7089 uses : actions/setup-python@v2
7190 with :
72- python-version : 3.9
91+ python-version : " 3.10 "
7392 - name : Install dependencies
7493 run : pip install tox pytest-github-actions-annotate-failures
7594 - name : Run tests
7897 TOXENV : cover
7998 run : tox
8099 - name : Upload codecov coverage
81- uses : codecov/codecov-action@v1
100+ uses : codecov/codecov-action@v2
82101 with :
83102 files : ./coverage.xml
84103 flags : unit
0 commit comments