Skip to content

Initial Commit

Initial Commit #1

Workflow file for this run

name: CI
on:
push:
branches: [main, master]
pull_request:
jobs:
# 1. LINTING & FORMATTING (Fail Fast)
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install Python Linters
run: pip install ruff black
- name: Run Python Lint (Ruff)
run: ruff check .
- name: Check Python Formatting (Black)
run: black --check .
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt
- name: Check Rust Formatting
run: cargo fmt -- --check
- name: Run Rust Lint (Clippy)
run: cargo clippy -- -D warnings
# 2. TEST & BUILD (Matrix Strategy)
test:
needs: lint
name: Test on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ['3.10', '3.11']
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install build tools
run: pip install maturin pytest
# Check Rust Tests
- name: Run Rust Tests
run: cargo test
# Build & Install Package (Dev Mode)
- name: Build and Install (Dev)
run: maturin develop
# Run Python Tests (using the installed Rust module)
- name: Run Python Tests
run: pytest