-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (48 loc) · 1.34 KB
/
python.yml
File metadata and controls
59 lines (48 loc) · 1.34 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: Python CI
on: push
jobs:
lint:
name: Check lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: "Set up Python"
uses: actions/setup-python@v5
with:
python-version-file: "pyproject.toml"
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
enable-cache: true
# Update output format to enable automatic inline annotations.
- name: Run Ruff
run: |
uv run ruff format --check tests
uv run ruff check --output-format=github tests
build:
name: Check Build
runs-on: ubuntu-latest
needs: lint
strategy:
matrix:
python-version:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
steps:
- uses: actions/checkout@v5
- name: Install uv and set the Python version
uses: astral-sh/setup-uv@v6
with:
python-version: ${{ matrix.python-version }}
enable-cache: true
- name: Build
run: |
uv build
# Check that basic features work and we didn't miss to include crucial files
- name: Smoke test (wheel)
run: uv run --isolated --with dist/*.whl pytest
- name: Smoke test (source distribution)
run: uv run --isolated --with dist/*.tar.gz pytest