-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (65 loc) · 1.72 KB
/
lint-test.yml
File metadata and controls
71 lines (65 loc) · 1.72 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: Lint and Test
on:
push:
branches:
- main
- master
pull_request:
workflow_dispatch:
permissions:
contents: read
env:
CARGO_TERM_COLOR: always
jobs:
python:
name: Python static checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.10"
- uses: astral-sh/setup-uv@v4
with:
enable-cache: true
- name: Sync Python tooling
run: uv sync --locked --only-group dev --no-install-project
- name: Ruff
run: uv run --no-sync ruff check .
- name: Pyright
run: uv run --no-sync pyright tests examples
python-tests:
name: Python tests py${{ matrix.python_version }}
runs-on: macos-14
strategy:
fail-fast: false
matrix:
python_version: ["3.10", "3.14"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python_version }}
- uses: astral-sh/setup-uv@v4
with:
enable-cache: true
- name: Sync Python tooling
run: uv sync --locked --only-group dev --no-install-project
- name: Build extension
run: uv run --no-sync maturin develop
- name: Python tests
run: uv run --no-sync python -m unittest discover
rust:
name: Rust
runs-on: macos-14
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Cargo check
run: cargo check --all-targets
- name: Cargo clippy
run: cargo clippy --all-targets -- -D warnings
- name: Cargo tests
run: cargo test --all-targets