Skip to content

Commit c122bee

Browse files
committed
Enbale github actions run on tox
1 parent 4a118e5 commit c122bee

File tree

1 file changed

+42
-12
lines changed

1 file changed

+42
-12
lines changed

.github/workflows/ci.yml

Lines changed: 42 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,60 @@
1+
# .github/workflows/ci.yml
12
name: CI
2-
33
on:
44
push:
55
pull_request:
66

77
jobs:
8-
tests:
8+
tox:
99
runs-on: ubuntu-latest
1010
strategy:
1111
fail-fast: false
1212
matrix:
13-
python-version: ["3.6", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
13+
python: ["3.6", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
14+
include:
15+
# Older CPythons live on Debian Buster images
16+
- python: "3.6"
17+
image: "python:3.6-buster"
18+
# Current releases use Debian Bookworm images
19+
- python: "3.9"
20+
image: "python:3.9-bookworm"
21+
- python: "3.10"
22+
image: "python:3.10-bookworm"
23+
- python: "3.11"
24+
image: "python:3.11-bookworm"
25+
- python: "3.12"
26+
image: "python:3.12-bookworm"
27+
- python: "3.13"
28+
image: "python:3.13-bookworm"
29+
# If 3.14 is still pre-release for you, switch to 3.14-rc-bookworm.
30+
- python: "3.14"
31+
image: "python:3.14-bookworm"
32+
33+
# Run each matrix entry *inside* the chosen Python image
34+
container:
35+
image: ${{ matrix.image }}
36+
1437
steps:
1538
- uses: actions/checkout@v4
1639

17-
- name: Set up Python ${{ matrix.python-version }}
18-
uses: actions/setup-python@v5
40+
# Cache pip inside the container filesystem
41+
- name: Set up pip cache
42+
uses: actions/cache@v4
1943
with:
20-
python-version: ${{ matrix.python-version }}
21-
cache: "pip"
44+
path: |
45+
~/.cache/pip
46+
key: ${{ runner.os }}-pip-${{ matrix.python }}-${{ hashFiles('**/pyproject.toml', '**/requirements*.txt', 'tox.ini', 'setup.cfg', 'setup.py') }}
47+
restore-keys: |
48+
${{ runner.os }}-pip-${{ matrix.python }}-
49+
50+
- name: Show Python
51+
run: python -V && which python && pip -V
2252

23-
- name: Install tox (and plugin to map py versions)
53+
- name: Upgrade pip & install tox
2454
run: |
25-
python -m pip install --upgrade pip
26-
pip install tox tox-gh-actions
55+
python -m pip install --upgrade pip
56+
pip install tox
2757
28-
- name: Run tox
29-
run: tox
58+
- name: Run tox for current interpreter
59+
run: tox -e py
3060

0 commit comments

Comments
 (0)