From a146d0b5d77583d3ab30f165515dd1823fd259fd Mon Sep 17 00:00:00 2001 From: appleb_m Date: Mon, 27 Apr 2026 11:57:50 +0200 Subject: [PATCH] gitea: added tests to action.yaml --- .gitea/workflows/action.yaml | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/action.yaml b/.gitea/workflows/action.yaml index dc790056..adcc70b2 100644 --- a/.gitea/workflows/action.yaml +++ b/.gitea/workflows/action.yaml @@ -18,10 +18,39 @@ on: env: DEPLOY_BRANCH: gitea-pages PREVIEWS_DIR: previews + PYTHONPATH: src jobs: + test: + runs-on: ubuntu-latest + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + + - name: Cache pip + uses: actions/cache@v4 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip-test-${{ hashFiles('**/pyproject.toml') }} + + - name: Set Up Python + uses: actions/setup-python@v4 + with: + python-version: '3.12' + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install pytest pytest-cov pytest-mock pytest-qt + pip install -e . + + - name: Run tests with pytest + run: | + pytest --cov=aare --cov-report=xml tests/unit + build: runs-on: ubuntu-latest + needs: test steps: - name: Checkout Repository uses: actions/checkout@v4 @@ -63,7 +92,7 @@ jobs: docs: name: Build and Deploy Docs runs-on: ubuntu-latest - needs: build + needs: [build, test] steps: - name: Checkout Repository uses: actions/checkout@v4