Skip to content

Chore/upgrade python 314 #153

Chore/upgrade python 314

Chore/upgrade python 314 #153

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-latest
steps:
- uses: actions/checkout@v3
# Set up Python first
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
# Install Rust toolchain
- name: Install Rust toolchain
run: |
rustup toolchain install stable
rustup default stable
rustup component add clippy
# Clippy - Rust linter
- name: Run Clippy
run: cargo clippy -- -D warnings
# Build Rust code first
- name: Build
run: cargo build --verbose
# Set up Python virtual environment and run Python tests
- name: Setup and run Python tests
run: |
python -m venv venv
source venv/bin/activate
pip install ruff maturin
ruff check .
maturin develop
python -m unittest discover -s tests -p '*.py'
# Run Rust tests with Python environment available
- name: Run tests
run: |
source venv/bin/activate
cargo test --verbose