Skip to content

Commit 44fe7e4

Browse files
committed
Test for more Python versions
1 parent 2cd6699 commit 44fe7e4

File tree

4 files changed

+62
-11
lines changed

4 files changed

+62
-11
lines changed

.github/workflows/code-quality.yml

+46-2
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,17 @@ on:
99
- master
1010

1111
jobs:
12-
code-quality-check:
12+
code-quality:
13+
name: Code quality
1314
runs-on: ubuntu-latest
1415
steps:
1516
- uses: actions/checkout@v4
1617
- name: Set up Python
1718
uses: actions/setup-python@v5
1819
with:
1920
python-version: 3.11
20-
- name: Install pre-commit
21+
cache: "pip"
22+
- name: Install dependencies
2123
run: |
2224
python -m pip install -U pip
2325
make requirements-dev
@@ -28,6 +30,48 @@ jobs:
2830
- name: Run pre-commit
2931
run: |
3032
pre-commit run -a
33+
34+
run-tests:
35+
name: Tests on ${{ matrix.os }} and ${{ matrix.python }}
36+
needs: [code-quality]
37+
runs-on: ${{ matrix.os }}
38+
strategy:
39+
matrix:
40+
os: [ubuntu-latest, windows-latest, macos-latest]
41+
python:
42+
["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "pypy3.9", "pypy3.10"]
43+
steps:
44+
- uses: actions/checkout@v4
45+
- uses: actions/setup-python@v5
46+
name: Install Python
47+
with:
48+
python-version: ${{ matrix.python }}
49+
cache: "pip"
50+
- name: Install dependencies
51+
run: |
52+
python -m pip install -U pip
53+
make requirements-dev
54+
make requirements
55+
- name: Code coverage
56+
run: |
57+
make run-tests
58+
59+
code-coverage:
60+
name: Code coverage
61+
needs: [run-tests, code-quality]
62+
runs-on: ubuntu-latest
63+
steps:
64+
- uses: actions/checkout@v4
65+
- name: Set up Python
66+
uses: actions/setup-python@v5
67+
with:
68+
python-version: 3.11
69+
cache: "pip"
70+
- name: Install dependencies
71+
run: |
72+
python -m pip install -U pip
73+
make requirements-dev
74+
make requirements
3175
- name: Code coverage
3276
run: |
3377
make run-coverage

.github/workflows/deploy.yml

+12-7
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ jobs:
1717
runs-on: ${{ matrix.os }}
1818
strategy:
1919
matrix:
20-
# os: [windows-latest]
2120
os: [ubuntu-latest, windows-latest, macos-latest]
22-
python: ["3.8", "3.9", "3.10", "3.11"]
21+
python:
22+
["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "pypy3.9", "pypy3.10"]
2323

2424
steps:
2525
- uses: actions/checkout@v4
@@ -28,6 +28,7 @@ jobs:
2828
name: Install Python
2929
with:
3030
python-version: ${{ matrix.python }}
31+
cache: "pip"
3132

3233
- name: Install Python 3
3334
if: runner.os == 'Windows'
@@ -37,7 +38,6 @@ jobs:
3738
if: runner.os == 'Windows'
3839
run: |
3940
choco install visualstudio2019buildtools
40-
# choco install vcredist2015 -f -y
4141
- name: Install dependencies
4242
run: |
4343
python -m pip install --upgrade pip
@@ -47,7 +47,6 @@ jobs:
4747
- name: Build wheels
4848
run: |
4949
pip wheel -w wheelhouse .
50-
# python -m cibuildwheel --output-dir wheelhouse
5150
env:
5251
CIBW_SKIP: cp27-win*
5352
- uses: actions/upload-artifact@v4
@@ -56,23 +55,29 @@ jobs:
5655
name: wikipedia-api-${{ matrix.os }}-${{ matrix.python }}.whl
5756

5857
build_sdist:
59-
name: Build source distribution
60-
runs-on: ubuntu-latest
58+
name: Build source dist on ${{ matrix.os }} and ${{ matrix.python }}
59+
runs-on: ${{ matrix.os }}
60+
strategy:
61+
matrix:
62+
os: [ubuntu-latest, windows-latest, macos-latest]
63+
python:
64+
["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "pypy3.9", "pypy3.10"]
6165
steps:
6266
- uses: actions/checkout@v4
6367

6468
- uses: actions/setup-python@v5
6569
name: Install Python
6670
with:
6771
python-version: ${{ matrix.python }}
72+
cache: "pip"
6873

6974
- name: Build sdist
7075
run: python setup.py sdist
7176

7277
- uses: actions/upload-artifact@v4
7378
with:
7479
path: dist/Wikipedia*.tar.gz
75-
name: wikipedia-api-sdist.tar.gz
80+
name: wikipedia-api-${{ matrix.os }}-${{ matrix.python }}.tar.gz
7681

7782
upload_pypi:
7883
needs: [build_wheels, build_sdist]

.github/workflows/tox.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,16 @@ jobs:
77
runs-on: ubuntu-latest
88
strategy:
99
matrix:
10-
python: ["3.8", "3.9", "3.10", "3.11", "3.12"]
10+
python:
11+
["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "pypy3.9", "pypy3.10"]
1112

1213
steps:
1314
- uses: actions/checkout@v4
1415
- name: Setup Python
1516
uses: actions/setup-python@v5
1617
with:
1718
python-version: ${{ matrix.python }}
19+
cache: "pip"
1820
- name: Install Tox and any other packages
1921
run: make requirements-dev
2022
- name: Run Tox

tox.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Install old pythons
22
# https://launchpad.net/~deadsnakes/+archive/ubuntu/ppa
33
[tox]
4-
envlist = py34, py35, py36, py37, py38, py39, py310, py311
4+
envlist = py38, py39, py310, py311, py312
55

66
[testenv]
77
deps =

0 commit comments

Comments
 (0)