-
-
Notifications
You must be signed in to change notification settings - Fork 8
65 lines (63 loc) · 1.87 KB
/
ci.yaml
File metadata and controls
65 lines (63 loc) · 1.87 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
name: CI
on:
pull_request:
push:
branches:
- main
jobs:
validate:
name: "Validate"
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Setup Python 3.11
uses: actions/setup-python@v6
with:
python-version: "3.11"
- name: Install Pre-Commit
run: python -m pip install pre-commit && pre-commit install
- name: Load cached Pre-Commit Dependencies
uses: actions/cache@v5
with:
path: ~/.cache/pre-commit/
key: pre-commit-4|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }}
- name: Execute Pre-Commit
run: pre-commit run --show-diff-on-failure --color=always --all-files
python_tests:
name: "Python Tests"
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
python-version:
["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14", "3.14t"]
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@v7.3.0
with:
python-version: ${{ inputs.python-version }}
activate-environment: true
cache-dependency-glob: "**/uv.lock"
- name: Install project
run: uv pip install .
- name: Set pythonpath
run: echo "PYTHONPATH=$PWD" >> $GITHUB_ENV
- name: Install library
run: uv run maturin develop
- name: Test
run: uv run pytest --parallel-threads=10
rust_tests:
name: "Rust Tests"
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v6
- name: Test with Coverage
run: cargo test