CI: Add Python 3.10 and 3.11, update actions, run on pushes and manually

A bit of CI maintenance:
- Add Python 3.10 and 3.11 runs, and update the PyPy run to PyPy 3.9
- Removed Python 3.7 as it is deprecated
- Update the used actions (checkout and setup-python) to the latest versions
- Also run on pushes, when manually triggered (workflow_dispatch)

The original PR was done by @EwoutH at #334
This commit is contained in:
Willian Rocha 2023-10-02 18:38:20 -03:00 committed by Alan Barzilay
parent eb65254646
commit 8af7d85a74
4 changed files with 15 additions and 11 deletions

View File

@ -1,19 +1,23 @@
name: Tests and Codecov name: Tests and Codecov
on: pull_request on:
push:
pull_request:
workflow_dispatch:
jobs: jobs:
run_tests: run_tests:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
python-version: [3.7, 3.8, 3.9, pypy-3.7] python-version: ['3.8', '3.9', '3.10', '3.11', 'pypy-3.9']
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v2 uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }} - name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2 uses: actions/setup-python@v4
with: with:
python-version: ${{ matrix.python-version }} python-version: ${{ matrix.python-version }}
@ -30,7 +34,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v2 uses: actions/checkout@v3
- name: Install dependencies - name: Install dependencies
run: | run: |
@ -44,7 +48,7 @@ jobs:
run: coverage xml run: coverage xml
- name: Upload coverage to Codecov - name: Upload coverage to Codecov
uses: codecov/codecov-action@v2 uses: codecov/codecov-action@v3
with: with:
files: coverage.xml files: coverage.xml
fail_ci_if_error: true fail_ci_if_error: true

View File

@ -43,7 +43,6 @@ setup(
'License :: OSI Approved :: Apache Software License', 'License :: OSI Approved :: Apache Software License',
'Natural Language :: English', 'Natural Language :: English',
'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10', 'Programming Language :: Python :: 3.10',

View File

@ -1,12 +1,13 @@
[tox] [tox]
envlist = py37, py38, py39, pypy3, flake8 envlist = py38, py39, py310, py311, pypy3, flake8
[gh-actions] [gh-actions]
python = python =
3.7: py37
3.8: py38 3.8: py38
3.9: py39 3.9: py39
pypy-3.7: pypy3 3.10: py310
3.11: py311
pypy-3.9: pypy3
[testenv] [testenv]
setenv = setenv =