From f5976bfb3cb352acca4e4126ff4d177ec508c6b5 Mon Sep 17 00:00:00 2001 From: David Laing Date: Fri, 15 Apr 2022 19:31:40 +0100 Subject: [PATCH] Add CI for Python 3.7, 3.8, 3.9, 3.10 & pypy-3.7 via GitHub actions Co-authored-by: David Laing --- .github/workflows/build-and-test.yml | 31 ++++++++++++++++++++++++++++ tox.ini | 2 +- 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/build-and-test.yml diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml new file mode 100644 index 0000000..e0f642f --- /dev/null +++ b/.github/workflows/build-and-test.yml @@ -0,0 +1,31 @@ +name: Build and test + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +permissions: + contents: read + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ['3.7', '3.8', '3.9', '3.10', 'pypy-3.7'] + steps: + - uses: actions/checkout@v3 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v3 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U tox + - name: Run tox + # Run tox using the version of Python in `PATH` + run: tox -e py diff --git a/tox.ini b/tox.ini index 1b32ac7..230fb3e 100644 --- a/tox.ini +++ b/tox.ini @@ -2,7 +2,7 @@ python_files=test*.py [tox] -envlist = py26, py27, py33, py34, py35, py36, pypy +envlist = py37, py38, py39, py3.10, pypy3.7 [testenv] deps=pytest