Skip to content

added license

added license #6

Workflow file for this run

name: CI
on:
push:
branches: [main, master]
paths-ignore:
- '.github/**'
- '*.md'
- 'LICENSE'
pull_request:
paths-ignore:
- '.github/**'
- '*.md'
- 'LICENSE'
jobs:
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
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: dtolnay/rust-toolchain@stable
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Create virtualenv
run: |
python -m venv .venv
shell: bash
- name: Activate virtualenv (Unix)
if: runner.os != 'Windows'
run: |
echo "${{ github.workspace }}/.venv/bin" >> $GITHUB_PATH
echo "VIRTUAL_ENV=${{ github.workspace }}/.venv" >> $GITHUB_ENV
shell: bash
- name: Activate virtualenv (Windows)
if: runner.os == 'Windows'
run: |
echo "${{ github.workspace }}\.venv\Scripts" >> $env:GITHUB_PATH
echo "VIRTUAL_ENV=${{ github.workspace }}\.venv" >> $env:GITHUB_ENV
shell: pwsh
- name: Install build tools
run: pip install maturin pytest numpy
- name: Run Rust Tests
run: cargo test --no-default-features -v
- name: Build and Install (Dev)
run: maturin develop
- name: Run Python Tests
run: pytest -v