From ea862240b1e828221259bccd184d9946abe73b7f Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 30 Dec 2024 10:15:59 +0100 Subject: [PATCH] Add unit test to workflow --- .github/workflows/ci.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 64549b4..a07d0e7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,6 +30,25 @@ jobs: run: | flake8 . --ignore=E501,W503 + unit-tests-python: + name: "🧪 Unit tests: python" + # if: ${{ !(github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) }} + needs: style-python + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup python + uses: actions/setup-python@v5 + with: + python-version: "3.10" + + - name: Run tests + run: | + python -m unittest discover -s inventree_supplier_sync + publish: if: github.event_name == 'release' && github.event.action == 'published' needs: [style-python]