passing tests and updated pyproject to complete compilation of sources. #67
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Python package | ||
on: [push] | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 60 | ||
strategy: | ||
matrix: | ||
python-version: ["3.11", "3.12"] | ||
concurrency: | ||
group: ci-${{ github.ref }} | ||
cancel-in-progress: true | ||
defaults: | ||
run: | ||
shell: bash -l {0} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: conda-incubator/setup-miniconda@v2 | ||
with: | ||
miniconda-version: "latest" | ||
mamba-version: "*" | ||
environment-file: conda/dev.yaml | ||
channels: conda-forge,nodefaults | ||
activate-environment: pyreaddbc | ||
use-mamba: true | ||
miniforge-variant: Mambaforge | ||
- name: Install uv | ||
uses: astral-sh/setup-uv@v4 | ||
- name: Set up Python | ||
run: uv python install | ||
- name: Install the project | ||
run: uv sync --all-extras --dev | ||
- name: Run tests | ||
# For example, using `pytest` | ||
run: uv run pytest tests | ||
- name: Build wheel | ||
run: uv build --wheel | ||
- name: Lint with flake8 | ||
run: | | ||
# stop the build if there are Python syntax errors or undefined names | ||
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | ||
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | ||
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | ||
- name: Test with pytest | ||
run: | | ||
poetry run pytest -vv -k "ZIKABR21 or STPI2206 or sids" tests/ |