-
Notifications
You must be signed in to change notification settings - Fork 17
94 lines (75 loc) · 2.16 KB
/
test.yml
File metadata and controls
94 lines (75 loc) · 2.16 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
name: Run Tests
on:
workflow_call:
push:
branches: [main]
paths-ignore:
- '**.md'
env:
PROJECT_NAME: typeid-python
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 9
submodules: false
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@v3
- name: Sync dependencies (locked)
run: |
uv sync --locked --all-groups
- name: Run tests
run: |
make test
- name: Run linters
run: |
make check-linting
test-rust-accel:
runs-on: ${{ matrix.os }}
needs:
- test
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.11"]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Install uv
uses: astral-sh/setup-uv@v3
- name: Sync deps (locked, no extras)
run: |
uv sync --locked --all-groups
- name: Build & install Rust extension (maturin develop)
uses: PyO3/maturin-action@v1
with:
command: develop
args: --release
working-directory: rust-base32
# Install the remaining deps of the rust extra WITHOUT trying to fetch typeid-base32
- name: Install rust extra deps (without fetching typeid-base32)
shell: bash
run: |
uv pip install "uuid-utils>=0.12.0"
uv pip install -e ".[rust]" --no-deps
- name: Sanity check (import extension)
run: |
uv run python -c "import typeid_base32; print('typeid_base32 OK')"