From 2fd75d1e29f20b36f5d61e418b8b4d6801750efe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20St=C3=B6ckli?= Date: Wed, 22 Oct 2025 07:46:58 +0000 Subject: [PATCH 1/3] initial workflow for CI (pytest) --- .github/workflows/ci.yml | 45 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..26c924f --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,45 @@ +name: Python CI + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + workflow_dispatch: + +permissions: + contents: read + +jobs: + test: + name: Run Tests + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ['3.11', '3.14'] # the one we have in the Codespace + the latest major one. + fail-fast: false # Continue testing other versions if one fails + + steps: + - name: Checkout repository + uses: actions/checkout@v5 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v6 + with: + python-version: ${{ matrix.python-version }} + cache: 'pip' + + - name: Install dependencies + run: | + python -m venv .venv + source .venv/bin/activate + python -m pip install --upgrade pip + python -m pip install -r requirements.txt + python -m pip install -r requirements-test.txt + + - name: Run tests with pytest + run: | + source .venv/bin/activate + pytest tests/ -v + env: + PYTHONPATH: ${{ github.workspace }} From b111371e47f62bb6965726f87342777ec366c564 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20St=C3=B6ckli?= Date: Wed, 22 Oct 2025 07:51:11 +0000 Subject: [PATCH 2/3] remove wf dispatch --- .github/workflows/ci.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 26c924f..4f68660 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,7 +5,6 @@ on: branches: [ main ] pull_request: branches: [ main ] - workflow_dispatch: permissions: contents: read @@ -17,7 +16,7 @@ jobs: strategy: matrix: python-version: ['3.11', '3.14'] # the one we have in the Codespace + the latest major one. - fail-fast: false # Continue testing other versions if one fails + fail-fast: false # Continue testing other version(s) if one fails steps: - name: Checkout repository From 97db5ef92e9d0419bf7cf6112f0832f62e70ea9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20St=C3=B6ckli?= Date: Wed, 22 Oct 2025 07:53:10 +0000 Subject: [PATCH 3/3] change to python 3.13 as max test version --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4f68660..0c36a28 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ['3.11', '3.14'] # the one we have in the Codespace + the latest major one. + python-version: ['3.11', '3.13'] # the one we have in the Codespace + the latest supported one by PyO3. fail-fast: false # Continue testing other version(s) if one fails steps: