From ba55204e77ff3081289b3bf1fc57d55e3c99f880 Mon Sep 17 00:00:00 2001 From: icanhasmath Date: Mon, 9 Nov 2026 22:53:35 -0600 Subject: [PATCH] Run the test suite on Python 2.7 and 3.8 in GitHub Actions The fork's only CI config was .travis.yml, which no longer runs, so pull requests reported no checks and security releases rested on local runs. Python 2.7 runs in the python:2.7 image because setup-python no longer provides it. tox.ini's addopts asks for pytest-cov, so the job clears it. --- .github/workflows/tests.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/tests.yml diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..18a3a97 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,34 @@ +name: tests + +on: + pull_request: + push: + branches: [version-4.5.x] + workflow_dispatch: + +permissions: + contents: read + +jobs: + test: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + # Python 2.7 is the reason this branch exists. setup-python no longer + # ships 2.7, so the suite runs in the official image. + - python: "2.7" + pins: "pytest==4.6.11 mock==3.0.5 pyasn1==0.4.8" + - python: "3.8" + pins: "pytest mock pyasn1" + container: python:${{ matrix.python }} + steps: + - uses: actions/checkout@v4 + - name: Install + run: | + python -m pip install --disable-pip-version-check ${{ matrix.pins }} + python -m pip install --disable-pip-version-check --no-deps -e . + # tox.ini's [pytest] addopts asks for pytest-cov; CI only needs the result. + - name: Test + run: python -m pytest -o addopts= -v tests