-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (35 loc) · 1.14 KB
/
Copy pathpython-package-ci.yml
File metadata and controls
43 lines (35 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: Python Package CI
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
jobs:
test:
name: Python package test (${{ matrix.os }}, Python ${{ matrix.python-version }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.10", "3.14"]
steps:
- uses: actions/checkout@v7
- name: Install uv
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
- name: Set up Python
uses: actions/setup-python@v7
with:
python-version: ${{ matrix.python-version }}
- name: Run tests
run: uv run pytest
- name: Build Python wheel and sdist
run: uv build
- name: Smoke test Python package
shell: bash
run: |
wheel="$(ls dist/*.whl | head -n 1)"
temp_dir="$(mktemp -d)"
uvx --from "$wheel" devspec version
uvx --from "$wheel" devspec init --target "$temp_dir" --profile core --repo-state existing
uvx --from "$wheel" devspec doctor --target "$temp_dir" --profile core