From 1fab34e39ca219cdda49c2688d61ea4f6e5aa183 Mon Sep 17 00:00:00 2001 From: Liam Keegan Date: Wed, 4 Jun 2025 08:27:48 +0200 Subject: [PATCH] add ci job to run tests --- .github/workflows/pypi.yml | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index f460a80..123c156 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -1,6 +1,12 @@ name: PyPI publishing -on: push +on: + push: + branches: + - main + pull_request: + branches: + - main jobs: pypi: @@ -18,5 +24,22 @@ jobs: - if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/') uses: pypa/gh-action-pypi-publish@release/v1 with: + # to publish to the real PyPI remove this repository-url line: repository-url: https://test.pypi.org/legacy/ verbose: true + test: + runs-on: ${{ matrix.os }} + name: "${{ matrix.os }} :: ${{ matrix.python-version }}" + strategy: + fail-fast: false + matrix: + os: ["ubuntu-latest", "windows-latest", "macos-latest"] + python-version: ["3.9", "3.13"] + steps: + - uses: actions/checkout@v4 + # install the calculate-liam package including the optional test dependencies + - run: pip install -e .[test] + working-directory: calculate-liam + # run the test suite + - run: pytest -v + working-directory: calculate-liam/test