From 712b30a44508dacba8d2f250753035f168e0812b Mon Sep 17 00:00:00 2001 From: Anish Athalye Date: Sun, 16 Jul 2023 12:10:33 -0400 Subject: [PATCH] Add Python 2.7 testing back to CI This patch uses the strategy described in https://github.com/actions/setup-python/issues/672. --- .github/workflows/build.yml | 23 ++++++++++++++++++++++- tox.ini | 4 ++++ 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index aca9917..dd61438 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,7 +5,7 @@ on: schedule: - cron: '0 8 * * 6' jobs: - test: + test-py3: env: PIP_DISABLE_PIP_VERSION_CHECK: 1 strategy: @@ -39,6 +39,27 @@ jobs: python -m tox -e coverage_report - uses: codecov/codecov-action@v3 + test-py2: + env: + PIP_DISABLE_PIP_VERSION_CHECK: 1 + runs-on: ubuntu-20.04 + container: + image: python:2.7.18-buster + name: "Test: Python 2.7 on ubuntu-20.04" + steps: + - uses: actions/checkout@v3 + with: + submodules: recursive + - name: "Install dependencies" + run: | + python -m pip install --upgrade pip setuptools + python -m pip install tox tox-gh-actions + - name: "Run tests" + run: | + python -m tox + python -m tox -e coverage_report + - uses: codecov/codecov-action@v3 + fmt: name: Format runs-on: ubuntu-22.04 diff --git a/tox.ini b/tox.ini index 4b0ad6c..2a5ebe1 100644 --- a/tox.ini +++ b/tox.ini @@ -72,3 +72,7 @@ python = 3.5: py35-most_platforms 3.6: py36-most_platforms 3.7: py37-most_platforms + +; Disable problem matcher because it causes issues when running in a container; +; see https://github.com/ymyzk/tox-gh-actions/issues/126 +problem_matcher = False