From d32e6c2d234ff0e0438c12d6d84f2d37aa36640b Mon Sep 17 00:00:00 2001 From: Tom Webber Date: Thu, 30 May 2024 15:08:40 +0100 Subject: [PATCH] add python test workflow on changes to python scripts or python tests --- .github/workflows/python-tests.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/python-tests.yml diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml new file mode 100644 index 0000000..760aa54 --- /dev/null +++ b/.github/workflows/python-tests.yml @@ -0,0 +1,29 @@ +name: Run Python Tests + +on: + workflow_dispatch: + pull_request: + paths: + - "scripts/**.py" + - "tests/**.py" + push: + paths: + - "scripts/**.py" + - "tests/**.py" + +jobs: + unit: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-python@v5 + with: + python-version: 3.11 + + - name: Install dependencies + run: pip install semantic-version pytest + + - name: run unit tests + id: python-tests + run: poetry run pytest tests/