Skip to content

Commit 26ddfef

Browse files
authored
Add matrix example for python-version (#175)
1 parent ee4fa33 commit 26ddfef

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,25 @@ This will override any python version specifications in `pyproject.toml` and `.p
8989
python-version: "3.12"
9090
```
9191

92+
You can combine this with a matrix to test multiple python versions:
93+
94+
```yaml
95+
jobs:
96+
test:
97+
runs-on: ubuntu-latest
98+
strategy:
99+
matrix:
100+
python-version: ["3.9", "3.10", "3.11", "3.12"]
101+
steps:
102+
- uses: actions/checkout@v4
103+
- name: Install the latest version of uv and set the python version
104+
uses: astral-sh/setup-uv@v3
105+
with:
106+
python-version: ${{ matrix.python-version }}
107+
- name: Test with python ${{ matrix.python-version }}
108+
run: uv run --frozen pytest
109+
```
110+
92111
### Validate checksum
93112

94113
You can specify a checksum to validate the downloaded executable. Checksums up to the default version

0 commit comments

Comments
 (0)