name: CI
on:
push:
branches: [master]
paths:
- "**.rs"
- "**.py"
- "Cargo.toml"
- "Cargo.lock"
- "pyproject.toml"
pull_request:
paths:
- "**.rs"
- "**.py"
- "Cargo.toml"
- "Cargo.lock"
- "pyproject.toml"
permissions: {}
concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
env:
CARGO_INCREMENTAL: 0
CARGO_NET_RETRY: 10
CARGO_TERM_COLOR: always
jobs:
rust:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
- run: cargo fmt --all -- --check
- run: cargo clippy --all-targets --features python -- -D warnings
- run: cargo test
python:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
- uses: astral-sh/setup-uv@v7
- uses: dtolnay/rust-toolchain@stable
- name: Install dependencies
run: |
uv venv
uv pip install -e ".[dev]"
- run: uv run ruff check python/
- run: uv run ruff format --check python/
- run: uv run mypy python/dvpl_converter/