Skip to content

Add Python API

Add Python API #21

Workflow file for this run

name: Run tests
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
jobs:
run-tests:
name: Run tests on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.name }}
cancel-in-progress: true
strategy:
fail-fast: false
matrix:
include:
- { name: linux-python3.8-minimum , requirements: minimum, python-ver: "3.8" , os: ubuntu-latest }
- { name: linux-python3.12 , requirements: pinned , python-ver: "3.12", os: ubuntu-latest }
- { name: windows-python3.8-minimum , requirements: minimum, python-ver: "3.8" , os: windows-latest }
- { name: windows-python3.12 , requirements: pinned , python-ver: "3.12", os: windows-latest }
- { name: macos-python3.8-minimum , requirements: minimum, python-ver: "3.8" , os: macos-latest }
- { name: macos-python3.12 , requirements: pinned , python-ver: "3.12", os: macos-latest }
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-ver }}
- name: Install development/test dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements-dev.txt
- name: Install minimum dependencies
if: matrix.requirements == 'minimum'
run: |
python -m pip install -r requirements-min.txt
- name: Install pinned dependencies
if: matrix.requirements == 'pinned'
run: |
python -m pip install -r requirements.txt
- name: Install package
run: |
python -m pip install -e . # must install in editable mode for coverage to find sources
python -m pip list
- name: Run tests
run: |
pytest