1
0
Fork 0
mirror of synced 2024-11-22 08:15:34 -05:00

Add Python 2.7 testing back to CI

This patch uses the strategy described in
https://github.com/actions/setup-python/issues/672.
This commit is contained in:
Anish Athalye 2023-07-16 12:10:33 -04:00
parent b04a3f1844
commit 712b30a445
2 changed files with 26 additions and 1 deletions

View file

@ -5,7 +5,7 @@ on:
schedule: schedule:
- cron: '0 8 * * 6' - cron: '0 8 * * 6'
jobs: jobs:
test: test-py3:
env: env:
PIP_DISABLE_PIP_VERSION_CHECK: 1 PIP_DISABLE_PIP_VERSION_CHECK: 1
strategy: strategy:
@ -39,6 +39,27 @@ jobs:
python -m tox -e coverage_report python -m tox -e coverage_report
- uses: codecov/codecov-action@v3 - 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: fmt:
name: Format name: Format
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04

View file

@ -72,3 +72,7 @@ python =
3.5: py35-most_platforms 3.5: py35-most_platforms
3.6: py36-most_platforms 3.6: py36-most_platforms
3.7: py37-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