Skip to content

version 0.1.4 final #16

version 0.1.4 final

version 0.1.4 final #16

Workflow file for this run

# This workflow installs Python dependencies, runs tests and lints with a single version of Python
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: microbiorust-py python tests
on:
push:
branches: [ "main" ]
paths:
- 'microbiorust-py/**'
pull_request:
branches: [ "main" ]
paths:
- 'microbiorust-py/**'
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: 'pip'
cache-dependency-path: 'microbiorust-py/pyproject.toml'
- name: Set up Rust
uses: dtolnay/rust-toolchain@stable
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install maturin ruff pytest
pip install ./microbiorust-py
- name: Lint with ruff
run: |
# stop the build for critical errors (E9, F63, F7, F82 equivalents)
ruff check microbiorust-py/ --select E9,F63,F7,F82 --output-format=full
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
ruff check microbiorust-py/ --exit-zero --line-length=127
- name: Test with pytest
run: |
pytest -v
working-directory: microbiorust-py/tests