diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 47e88a9a0..b60b51b4d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,17 +40,15 @@ jobs: - name: Set up Python ${{ matrix.python-version }} if: ${{ matrix.os != 'windows-latest' }} - uses: actions/setup-python@v1 + uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} # See note below about need for using 32-bit Python 2.7 on - # Windows. The extra handling here for Python 3.6 on Windows is - # because I could not figure out the right GitHub Actions - # expression to do this in a better way. + # Windows. - name: Set up Python ${{ matrix.python-version }} [Windows x64] - if: ${{ ( matrix.os == 'windows-latest' ) && ( matrix.python-version == '3.6' ) }} - uses: actions/setup-python@v1 + if: ${{ ( matrix.os == 'windows-latest' ) && ( matrix.python-version != '2.7' ) }} + uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} architecture: 'x64' @@ -89,14 +87,14 @@ jobs: - name: Install Python packages run: | - pip install --upgrade codecov tox setuptools + pip install --upgrade codecov tox tox-gh-actions setuptools pip list - name: Display tool versions run: python misc/build_helpers/show-tool-versions.py - - name: Run "tox -e py27-coverage" - run: tox -e py27-coverage + - name: Run tox for corresponding Python version + run: python -m tox - name: Upload eliot.log in case of failure uses: actions/upload-artifact@v1 diff --git a/tox.ini b/tox.ini index a58d9d447..73dbb8e78 100644 --- a/tox.ini +++ b/tox.ini @@ -3,11 +3,21 @@ # test suite on all supported python versions. To use it, "pip install tox" # and then run "tox" from this directory. +# Map Python versions in GitHub Actions to tox environments to run. +[gh-actions] +python = + 2.7: py27-coverage,codechecks + 3.6: py36-coverage + 3.7: py37-coverage + 3.8: py38-coverage + 3.9: py39-coverage,typechecks + pypy-3.7: pypy3 + [pytest] twisted = 1 [tox] -envlist = typechecks,codechecks,py27,py36,pypy27 +envlist = typechecks,codechecks,py27,py36,py37,py38,py39,pypy27,pypy3 minversion = 2.4 [testenv]