Skip to content

Examples

Examples #2

Workflow file for this run

name: Examples
on:
workflow_dispatch:
schedule: # Run once a week to detect any regressions
- cron: '0 0 * * 1'
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
example: [
"Basic/dps_example.py",
"Basic/example_decorators.py",
"Basic/example_prallelization.py",
"Basic/example.py",
"Eijgenraam/eijgenram.py"]
steps:
- uses: actions/checkout@v4
- name: Get minimum Python version
run: |
PYTHON_VERSION=$(cat pyproject.toml | grep "requires-python" | grep -Eo "[0-9]+\.[0-9]+")
echo "PYTHON_VERSION=${PYTHON_VERSION}" >> $GITHUB_ENV
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
cache: "pip"
- name: Install dependencies
run: |
pip install .[test]
- name: Run example
run: |
python examples/${{ matrix.example }}