Repository navigation
55 lines (54 loc) · 1.68 KB
/
Copy pathchecks_python.yml
File metadata and controls
55 lines (54 loc) · 1.68 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
name: Checks and tests (Python)
on:
pull_request:
branches:
- main
permissions:
contents: read
jobs:
python_lint:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.11', '3.15']
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Install uv
uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
with:
python-version: ${{ matrix.python-version }}
- name: Setup Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@ecabd13d1c56bd1345c230e542e9144811ad706f # v2.0.0
- name: Install dependencies
working-directory: rustuna_pyo3
run: uv sync --group dev
- name: ruff
working-directory: rustuna_pyo3
run: |
uv run ruff check .
uv run ruff format --check .
- name: mypy
working-directory: rustuna_pyo3
run: uv run mypy rustuna/ python_examples/ tests/
python_test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.11', '3.15']
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Install uv
uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
with:
python-version: ${{ matrix.python-version }}
- name: Install Python packages
working-directory: rustuna_pyo3
run: |
uv sync --group dev
- name: Run tests
working-directory: rustuna_pyo3
run: uv run --no-sync pytest tests/