Skip to content

Commit 2a9eac8

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

File tree

1 file changed

+34
-11
lines changed

1 file changed

+34
-11
lines changed

.github/workflows/tests.yml

Lines changed: 34 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,26 +10,49 @@ 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
3432
run: |
33+
. venv-test/bin/activate
34+
pytest
35+
36+
37+
tests-pypy:
38+
runs-on: ubuntu-latest
39+
strategy:
40+
fail-fast: false
41+
matrix:
42+
pypy-version: ["3.10", "3.11", "latest"]
43+
container:
44+
image: pypy:${{ matrix.pypy-version }}
45+
46+
steps:
47+
- uses: actions/checkout@v4
48+
49+
- name: Install dependencies and run tests
50+
run: |
51+
python3 -m venv venv-test
52+
. venv-test/bin/activate
53+
pip install -e .[testing]
54+
55+
- name: Run test suite with pypy
56+
run: |
57+
. venv-test/bin/activate
3558
pytest

0 commit comments

Comments
 (0)