@@ -14,24 +14,25 @@ jobs:
14
14
15
15
continue-on-error : ${{ matrix.optional || false }}
16
16
runs-on : ${{ matrix.os || 'ubuntu-latest' }}
17
- container : ${{ matrix.container }}
17
+ container : ${{ !startsWith( matrix.os, 'windows') && (matrix. container || format('python:{0}', matrix.python-version)) || null }}
18
18
name : ${{ matrix.label || matrix.python-version }} ${{ startsWith(matrix.os, 'windows') && '(Windows)' || '' }} ${{ matrix.optional && '[OPTIONAL]' }}
19
19
20
20
strategy :
21
21
fail-fast : false
22
22
matrix :
23
- python-version : ['3.8 ', '3.9 ', '3.10 ', '3.11 ', '3.12 ', '3.13 ']
23
+ python-version : ['3.5 ', '3.6 ', '3.7 ', '3.8 ', '3.9 ', '3.10', '3.11', '3.12 ']
24
24
test_quick : [1]
25
25
26
26
include :
27
27
- python-version : ' 3.13'
28
28
label : Linting
29
29
toxenv : docformatter_check,flake8,flake8_tests,isort_check,mypy,sphinx,pydocstyle,pylint,pylint_tests
30
+ os-deps :
31
+ - enchant-2
30
32
31
- - python-version : ' 3.14-dev'
33
+ - python-version : ' 3.14'
34
+ container : ' python:3.14-rc'
32
35
optional : true
33
- toxenv : py314
34
- toxpython : 3.14
35
36
36
37
- python-version : ' 3.13'
37
38
test_keyboard : 1
@@ -42,26 +43,11 @@ jobs:
42
43
os : windows-latest
43
44
test_quick : 0
44
45
45
- - python-version : ' 3.7'
46
- os : ubuntu-22.04
47
- toxenv : py37
48
-
49
- - python-version : ' 3.6'
50
- os : ubuntu-20.04
51
- toxenv : py36
52
-
53
- - python-version : ' 3.5'
54
- os : ubuntu-20.04
55
- toxenv : py35
56
-
57
46
- python-version : ' 2.7'
58
- container : {image: 'python:2.7.18-buster'}
59
- toxenv : py27
60
47
test_keyboard : 1
61
48
test_raw : 1
62
49
test_quick : 0
63
50
64
-
65
51
env :
66
52
TOXENV : ${{ matrix.toxenv || format('py{0}', matrix.python-version) }}
67
53
TEST_QUICK : ${{ matrix.test_quick || 0 }}
@@ -70,22 +56,16 @@ jobs:
70
56
TOXPYTHON : python${{ matrix.toxpython || matrix.python-version }}
71
57
72
58
steps :
73
- - uses : actions/checkout@v4
59
+ # This is only needed for Python 3.6 and earlier because Tox 4 requires 3.7+
60
+ - name : Fix TOXENV
61
+ run : echo "TOXENV=$(echo $TOXENV | sed 's/\.//g')" >> $GITHUB_ENV
62
+ if : ${{ contains(fromJson('["2.7", "3.5", "3.6"]'), matrix.python-version) }}
74
63
75
- - name : Set up Python ${{ matrix.python-version }}
76
- uses : actions/setup-python@v5
77
- with :
78
- python-version : ${{ matrix.python-version }}
79
- if : ${{ matrix.python-version != '2.7' && matrix.python-version != '3.5' }}
64
+ - name : Install OS Dependencies
65
+ run : apt update && apt -y install ${{ join(matrix.os-deps, ' ') }}
66
+ if : ${{ matrix.os-deps }}
80
67
81
- # Workaround for https://github.com/actions/setup-python/issues/866
82
- - name : Set up Python 3.5 (Workaround)
83
- uses : actions/setup-python@v5
84
- with :
85
- python-version : 3.5
86
- env :
87
- PIP_TRUSTED_HOST : " pypi.python.org pypi.org files.pythonhosted.org"
88
- if : ${{ matrix.python-version == '3.5' }}
68
+ - uses : actions/checkout@v4
89
69
90
70
- name : Install tox
91
71
run : pip install tox
97
77
run : tox
98
78
99
79
- name : Upload to Codecov
100
- if : ${{ matrix.label != 'linting' && matrix.python-version != ' 2.7' }}
80
+ if : ${{ matrix.label != 'linting' && !contains(fromJson('[" 2.7", "3.5"]'), matrix.python-version) }}
101
81
102
82
uses : codecov/codecov-action@v4
103
83
with :
109
89
env_vars : TOXENV,TEST_QUICK,TEST_KEYBOARD,TEST_RAW
110
90
111
91
# Work around for https://github.com/codecov/codecov-action/issues/1277
112
- - name : Upload to Codecov (2.7 workaround)
113
- if : ${{ matrix.python-version == '2.7 ' && matrix.label != 'linting' }}
92
+ - name : Upload to Codecov Workaround
93
+ if : ${{ matrix.label != 'linting ' && contains(fromJson('["2.7", "3.5"]'), matrix.python-version) }}
114
94
115
95
uses : codecov/codecov-action@v3
116
96
with :
0 commit comments