3 on: [push, pull_request]
8 not_in_conda: "['3.11', 'pypy-3.7']"
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", "pypy-3.7"]
17 pip-cache-path: ~/.cache/pip
20 pip-cache-path: ~\AppData\Local\pip\Cache
22 name: Python ${{ matrix.python-version }} @ ${{ matrix.os-name }}
23 runs-on: ${{ matrix.os }}
28 - uses: actions/checkout@v2
29 - uses: s-weigand/setup-conda@v1
31 python-version: ${{ matrix.python-version }}
32 if: ${{ runner.os == 'Linux' && !contains(fromJSON(env.not_in_conda), matrix.python-version) }}
33 - uses: actions/setup-python@v4
35 python-version: ${{ matrix.python-version }}
36 if: ${{ runner.os != 'Linux' || contains(fromJSON(env.not_in_conda), matrix.python-version) }}
38 uses: actions/cache@v3
40 path: ${{ matrix.pip-cache-path }}
41 key: ${{ runner.os }}-pip
44 - name: Install dependencies
47 python -m pip install --upgrade pip setuptools wheel
49 pip install --upgrade virtualenv tox
53 if hasattr(sys, 'pypy_version_info'):
56 pyver = '%d%d' % tuple(sys.version_info[:2])
57 toxenv = 'py%s' % pyver
58 if os.name == 'posix':
59 toxenv += ',py%s-flake8' % pyver
60 with open(os.environ['GITHUB_ENV'], 'a') as f:
61 f.write('TOXENV=' + toxenv + '\n')
66 python -c "import os; print(os.environ['TOXENV'])"