10
10
strategy :
11
11
matrix :
12
12
os : [ubuntu-latest, windows-latest]
13
- python-version : ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "pypy3.7"]
13
+ python-version : ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "=3.9[build=*_pypy]"]
14
+
14
15
include :
15
16
- os : ubuntu-latest
16
17
os-name : Linux
@@ -26,15 +27,19 @@ jobs:
26
27
27
28
# Setup Python/pip
28
29
- uses : actions/checkout@v4
29
- - uses : s-weigand /setup-conda@v1
30
+ - uses : conda-incubator /setup-miniconda@v3
30
31
with :
31
- conda-channels : conda-forge
32
+ miniforge-version : latest
32
33
python-version : ${{ matrix.python-version }}
33
34
if : ${{ !contains(fromJSON(env.not_in_conda), matrix.python-version) }}
34
35
- uses : actions/setup-python@v4
35
36
with :
36
37
python-version : ${{ matrix.python-version }}
37
38
if : ${{ contains(fromJSON(env.not_in_conda), matrix.python-version) }}
39
+ - uses : actions/cache@v3
40
+ with :
41
+ path : ~/conda_pkgs_dir
42
+ key : ${{ runner.os }}-conda
38
43
- name : Cache pip
39
44
uses : actions/cache@v3
40
45
with :
@@ -49,29 +54,32 @@ jobs:
49
54
python -m pip install --upgrade pip setuptools wheel
50
55
pip --version
51
56
pip install --upgrade virtualenv "tox >= 3.15, < 4"
57
+ shell : bash -el {0}
52
58
- name : Set TOXENV
53
59
run : |
60
+ python -c "
54
61
import os, sys
55
62
ld_library_path = None
56
63
if hasattr(sys, 'pypy_version_info'):
57
- toxenv = 'pypy3'
64
+ toxenv = 'pypy3'
58
65
else:
59
- pyver = '%d%d' % tuple(sys.version_info[:2])
60
- if os.name == 'posix':
61
- if pyver == '27': # Python 2.7 on Linux requires `$LD_LIBRARY_PATH`
62
- ld_library_path = os.path.join(
63
- os.path.dirname(os.path.dirname(sys.executable)), 'lib')
64
- toxenv = 'py%s' % pyver
65
- if os.name == 'posix':
66
- toxenv += ',py%s-flake8' % pyver
66
+ pyver = '%d%d' % tuple(sys.version_info[:2])
67
+ if (pyver == '27') and (os.name == 'posix'): # Python 2.7 on Linux requires `$LD_LIBRARY_PATH`
68
+ ld_library_path = os.path.join(
69
+ os.path.dirname(os.path.dirname(sys.executable)), 'lib')
70
+ toxenv = 'py%s' % pyver
71
+ if os.name == 'posix':
72
+ toxenv += ',py%s-flake8' % pyver
67
73
with open(os.environ['GITHUB_ENV'], 'a') as f:
68
- if ld_library_path:
69
- f.write('LD_LIBRARY_PATH=' + ld_library_path + '\n')
70
- f.write('TOXENV=' + toxenv + '\n')
71
- shell : python
74
+ if ld_library_path:
75
+ f.write('LD_LIBRARY_PATH=' + ld_library_path + '\n')
76
+ f.write('TOXENV=' + toxenv + '\n')
77
+ "
78
+ shell : bash -el {0}
72
79
73
80
- name : Run tox
74
81
run : |
75
82
python -c "import os; print(os.environ['TOXENV'])"
76
83
tox --version
77
84
tox
85
+ shell : bash -el {0}
0 commit comments