Skip to content

Commit 1bf1993

Browse files
committed
ci: Test using all supported Python versions
Signed-off-by: Leandro Lucarella <[email protected]>
1 parent 4e3fd1f commit 1bf1993

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

.github/workflows/ci.yaml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,15 @@ on: [pull_request, push, workflow_dispatch]
44

55
jobs:
66
test:
7-
runs-on: ubuntu-20.04
7+
strategy:
8+
matrix:
9+
os:
10+
- ubuntu-20.04
11+
python-version:
12+
- "3.8"
13+
- "3.9"
14+
- "3.10"
15+
runs-on: ${{ matrix.os }}
816

917
steps:
1018
- name: Fetch sources
@@ -15,14 +23,14 @@ jobs:
1523
- name: Set up Python
1624
uses: actions/setup-python@v4
1725
with:
18-
python-version: "3.8"
26+
python-version: ${{ matrix.python-version }}
1927

2028
- uses: actions/cache@v3
2129
with:
2230
path: ~/.cache/pip
23-
key: ${{ runner.os }}-pip-${{ hashFiles('pyproject.toml') }}
31+
key: ${{ runner.os }}-${{ matrix.python-version }}-pip-${{ hashFiles('pyproject.toml') }}
2432
restore-keys: |
25-
${{ runner.os }}-pip-
33+
${{ runner.os }}-${{ matrix.python-version }}-pip-
2634
2735
- name: Install required Python packages
2836
run: |

0 commit comments

Comments
 (0)