3 on: [push, pull_request]
8 not_in_conda: "['3.11', 'pypy-3.7']"
12 python-version: ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "pypy-3.7"]
14 name: Python ${{ matrix.python-version }}
15 runs-on: ubuntu-latest
20 - uses: actions/checkout@v2
21 - uses: s-weigand/setup-conda@v1
23 python-version: ${{ matrix.python-version }}
24 if: ${{ runner.os == 'Linux' && !contains(fromJSON(env.not_in_conda), matrix.python-version) }}
25 - uses: actions/setup-python@v4
27 python-version: ${{ matrix.python-version }}
28 if: ${{ runner.os != 'Linux' || contains(fromJSON(env.not_in_conda), matrix.python-version) }}
30 uses: actions/cache@v3
32 # This path is specific to Linux/Unix
34 key: ${{ runner.os }}-pip
37 - name: Install dependencies
40 python -m pip install --upgrade pip setuptools wheel
42 pip install --upgrade virtualenv tox
46 if hasattr(sys, 'pypy_version_info'):
49 pyver = '%d%d' % tuple(sys.version_info[:2])
50 toxenv = 'py%s' % pyver
51 with open(os.environ['GITHUB_ENV'], 'a') as f:
52 f.write('TOXENV=' + toxenv + '\n')
56 - name: Run tox targets for ${{ matrix.python-version }}
58 python -c "import os; print(os.environ['TOXENV'])"