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