-
Notifications
You must be signed in to change notification settings - Fork 3
95 lines (82 loc) · 2.18 KB
/
test-python.yml
File metadata and controls
95 lines (82 loc) · 2.18 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
name: test-python
on:
pull_request:
branches: [ "*" ]
workflow_call:
workflow_dispatch:
jobs:
test_python:
runs-on: ubuntu-latest
strategy:
matrix:
target: [x86_64]
python-version:
- "3.10"
- "3.11"
- "3.12"
- "3.13"
- "3.14"
sync-args: [--locked]
include:
- target: x86_64
python-version: "3.10.0"
sync-args: --resolution=lowest-direct
steps:
- uses: actions/checkout@v3
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
python-version: ${{ matrix.python-version }}
- name: Install
run: uv sync --extra pydantic --group test ${{ matrix.sync-args }}
- name: Format
run: |
uv run --no-sync ruff check
uv run --no-sync ruff format --check
- name: Static typing
run: uv run --no-sync pyright ./src
- name: Test (without PGO)
run: uv run --no-sync pytest
test_platforms:
runs-on: ${{ matrix.platform.runner }}
strategy:
matrix:
platform:
# - runner: windows-latest
# - runner: ubuntu-latest
- runner: ubuntu-24.04-arm # aarch64
- runner: macos-15-intel # x86_64
- runner: macos-15 # aarch64
steps:
- uses: actions/checkout@v3
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
python-version: "3.10"
- name: Test
run: |
uv sync --locked --no-editable --extra pydantic --group test --group bench
uv run --no-sync pytest .
test_pgo:
runs-on: ${{ matrix.platform.runner }}
strategy:
matrix:
platform:
- runner: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
python-version: "3.10"
- name: Install
run: |
uv sync --locked --no-editable --extra pydantic --group test --group bench
rustup component add llvm-tools-preview
- name: Profile-Guided Optimization (PGO)
shell: bash
run: |
sh ./scripts/distr_pgo.sh
- name: Test (with PGO)
run: |
uv run --no-sync pytest .