Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Add unit tests
  • Loading branch information
jan-janssen committed Jan 8, 2026
commit 751298f487b4afe0bc73cc69bd4833a6e3a6d7f2
43 changes: 43 additions & 0 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -159,3 +159,46 @@ jobs:
jupyter-book build . --path-output public
mv public/_build/html public_html
touch public_html/.nojekyll

unittest_matrix:
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
include:
- operating-system: macos-latest
python-version: '3.14'

- operating-system: ubuntu-latest
python-version: '3.14'

- operating-system: windows-latest
python-version: '3.14'

- operating-system: ubuntu-latest
python-version: '3.13'

- operating-system: ubuntu-latest
python-version: '3.12'

- operating-system: ubuntu-latest
python-version: '3.11'

steps:
- uses: actions/checkout@v4
- name: Setup environment
shell: bash -l {0}
run: |
echo -e "channels:\n - conda-forge\n" > .condarc
- name: Setup Mambaforge
uses: conda-incubator/setup-miniconda@v3
with:
python-version: ${{ matrix.python-version }}
miniforge-version: latest
condarc-file: .condarc
environment-file: binder/environment.yml
- name: Test
shell: bash -l {0}
timeout-minutes: 30
run: |
pip install . --no-deps --no-build-isolation
python -m unittest discover tests
10 changes: 10 additions & 0 deletions tests/test_shared.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import unittest
from python_workflow_definition.shared import get_dict, get_list


class TestShared(unittest.TestCase):
def test_get_dict(self):
self.assertEqual({"a": 1, "b": 2, "c": 3}, get_dict(a=1, b=2, c=3))

def test_get_list(self):
self.assertEqual([1, 2, 3], get_list(a=1, b=2, c=3))
Loading