mirror of
https://github.com/astral-sh/setup-uv.git
synced 2025-02-23 17:15:20 +08:00
Add matrix example for python-version (#175)
This commit is contained in:
parent
ee4fa33003
commit
26ddfef6e1
19
README.md
19
README.md
@ -89,6 +89,25 @@ This will override any python version specifications in `pyproject.toml` and `.p
|
|||||||
python-version: "3.12"
|
python-version: "3.12"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
You can combine this with a matrix to test multiple python versions:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
python-version: ["3.9", "3.10", "3.11", "3.12"]
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Install the latest version of uv and set the python version
|
||||||
|
uses: astral-sh/setup-uv@v3
|
||||||
|
with:
|
||||||
|
python-version: ${{ matrix.python-version }}
|
||||||
|
- name: Test with python ${{ matrix.python-version }}
|
||||||
|
run: uv run --frozen pytest
|
||||||
|
```
|
||||||
|
|
||||||
### Validate checksum
|
### Validate checksum
|
||||||
|
|
||||||
You can specify a checksum to validate the downloaded executable. Checksums up to the default version
|
You can specify a checksum to validate the downloaded executable. Checksums up to the default version
|
||||||
|
Loading…
x
Reference in New Issue
Block a user