Skip to content

Chore/upgrade python 314 #157

Chore/upgrade python 314

Chore/upgrade python 314 #157

Workflow file for this run

name: Continuous Integration
on:
push:
branches:
- master
pull_request:
types: [opened, synchronize, reopened]
permissions: read-all
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
# Install Rust
- name: Install Rust toolchain
run: rustup toolchain install stable
# Run Clippy
- name: Run Clippy
run: rustup component add clippy && cargo clippy -- -D warnings
# Install Python dependencies for PyO3
- name: Setup Python
run: |
sudo apt-get update
sudo apt-get install -y python3-dev python3-venv python3-pip
python3 -m venv venv
source venv/bin/activate
pip install --upgrade pip
pip install maturin ruff
ruff check .
# Build Rust extension in develop mode
- name: Build Python extension
run: |
source venv/bin/activate
maturin develop
# Run Python tests
- name: Run Python unittests
run: |
source venv/bin/activate
python -m unittest discover -s tests -p '*.py'
# Build Rust normally
- name: Build Rust
run: cargo build --verbose
# Run Rust tests with all features (including PyO3)
- name: Run Rust tests
run: cargo test --all-features --verbose