Skip to content

Commit dbcd571

Browse files
committed
GitHub Actions: use official cpython/pypy containers to run tests
1 parent 385311a commit dbcd571

File tree

1 file changed

+32
-11
lines changed

1 file changed

+32
-11
lines changed

.github/workflows/tests.yml

Lines changed: 32 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,26 +10,47 @@ on:
1010
- main
1111

1212
jobs:
13-
tests:
14-
# "ubuntu-latest" does not have Python 3.6
15-
runs-on: ubuntu-20.04
13+
tests-cpython:
14+
runs-on: ubuntu-latest
1615
strategy:
1716
fail-fast: false
1817
matrix:
19-
python-version: [2.7, 3.6, 3.7, 3.8, 3.9, "3.10", "3.11", "pypy-2.7", "pypy-3.6"]
18+
python-version: [3.9, "3.10", "3.11", "3.12", "3.13", "3.14"]
19+
container:
20+
image: python:${{ matrix.python-version }}
2021

2122
steps:
22-
- uses: actions/checkout@v2
23-
- name: Set up Python ${{ matrix.python-version }}
24-
uses: actions/setup-python@v2
25-
with:
26-
python-version: ${{ matrix.python-version }}
23+
- uses: actions/checkout@v4
2724

2825
- name: Install dependencies
2926
run: |
27+
python3 -m venv venv-test
28+
. venv-test/bin/activate
3029
pip install -e .[testing]
31-
pip install pytest
3230
33-
- name: Run test suite
31+
- name: Run test suite with CPython
32+
run: |
33+
pytest
34+
35+
36+
tests-pypy:
37+
runs-on: ubuntu-latest
38+
strategy:
39+
fail-fast: false
40+
matrix:
41+
pypy-version: ["3.10", "3.11", "latest"]
42+
container:
43+
image: pypy:${{ matrix.pypy-version }}
44+
45+
steps:
46+
- uses: actions/checkout@v4
47+
48+
- name: Install dependencies and run tests
49+
run: |
50+
python3 -m venv venv-test
51+
. venv-test/bin/activate
52+
pip install -e .[testing]
53+
54+
- name: Run test suite with pypy
3455
run: |
3556
pytest

0 commit comments

Comments
 (0)