From 1dcd80a8bb004bda68dbb207438fc5319c816a32 Mon Sep 17 00:00:00 2001 From: zwitschi Date: Sun, 10 May 2026 11:34:27 +0200 Subject: [PATCH] feat: add testing job to build-container workflow and remove redundant push trigger from test-application workflow --- .gitea/workflows/build-container.yaml | 24 ++++++++++++++++++++++++ .gitea/workflows/test-application.yaml | 3 --- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/build-container.yaml b/.gitea/workflows/build-container.yaml index d22b7c4..7928f8b 100644 --- a/.gitea/workflows/build-container.yaml +++ b/.gitea/workflows/build-container.yaml @@ -7,7 +7,31 @@ on: - main jobs: + test: + runs-on: ubuntu-latest + steps: + - name: Check out repository code + uses: actions/checkout@v5 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: "3.12" + + - name: Create and activate virtual environment + run: | + python -m venv venv + source venv/bin/activate + pip install -r requirements.txt + pip install pytest + + - name: Run tests + run: | + source venv/bin/activate + pytest --maxfail=1 --disable-warnings -q + build-and-deploy: + needs: test runs-on: ubuntu-latest steps: - name: Check out repository code diff --git a/.gitea/workflows/test-application.yaml b/.gitea/workflows/test-application.yaml index 50d33e0..56e501c 100644 --- a/.gitea/workflows/test-application.yaml +++ b/.gitea/workflows/test-application.yaml @@ -4,9 +4,6 @@ on: pull_request: branches: - main - push: - branches: - - main jobs: test: