-
Notifications
You must be signed in to change notification settings - Fork 102
71 lines (56 loc) · 2.02 KB
/
test_python.yaml
File metadata and controls
71 lines (56 loc) · 2.02 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
name: Test Python bindings
on:
push:
branches: [main]
pull_request:
branches: [main]
types: [opened, synchronize, reopened] # trigger on PRs
paths:
- "kernel-abi-check/**"
- "kernels-data/**"
- ".github/workflows/test_python.yaml"
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
kernel-abi-check:
name: kernel-abi-check bindings
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.12"]
env:
UV_PYTHON_PREFERENCE: only-managed
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Install uv and set the python version
uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
with:
python-version: ${{ matrix.python-version }}
- name: Install the project
run: ( cd kernel-abi-check/bindings/python && uv sync --all-extras --dev)
- name: Run tests
run: ( cd kernel-abi-check/bindings/python && uv run pytest tests )
kernels-data:
name: kernels-data bindings
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.12"]
env:
UV_PYTHON_PREFERENCE: only-managed
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Install uv and set the python version
uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
with:
python-version: ${{ matrix.python-version }}
- name: Install the project
run: ( cd kernels-data/bindings/python && uv sync --all-extras --dev)
- name: Run tests
run: ( cd kernels-data/bindings/python && uv run pytest tests )
- name: Check type stubs match runtime
run: ( cd kernels-data/bindings/python && uv run python -m mypy.stubtest kernels_data --allowlist stubtest-allowlist.txt )