From 76eb2cce415a3518c8b21898853cf46b38119f5f Mon Sep 17 00:00:00 2001 From: ribardej Date: Tue, 21 Oct 2025 15:44:33 +0200 Subject: [PATCH] feat(tests): Added tests to PR and Prod workflows --- .github/workflows/deploy-pr.yaml | 23 +++++++++++++++++++++++ .github/workflows/deploy-prod.yaml | 23 +++++++++++++++++++++++ 2 files changed, 46 insertions(+) diff --git a/.github/workflows/deploy-pr.yaml b/.github/workflows/deploy-pr.yaml index c59f484..56938bd 100644 --- a/.github/workflows/deploy-pr.yaml +++ b/.github/workflows/deploy-pr.yaml @@ -9,6 +9,29 @@ permissions: pull-requests: write jobs: + test: + name: Run Python Tests + if: github.event.action != 'closed' + runs-on: ubuntu-latest + + steps: + - name: Check out repository code + uses: actions/checkout@v4 + + - name: Set up Python 3.11 + uses: actions/setup-python@v5 + with: + python-version: '3.11' + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + + - name: Run tests with pytest + run: pytest + working-directory: ./7project/backend + build: if: github.event.action != 'closed' name: Build and push image (reusable) diff --git a/.github/workflows/deploy-prod.yaml b/.github/workflows/deploy-prod.yaml index 37f703c..15e5354 100644 --- a/.github/workflows/deploy-prod.yaml +++ b/.github/workflows/deploy-prod.yaml @@ -21,6 +21,29 @@ concurrency: cancel-in-progress: false jobs: + test: + name: Run Python Tests + if: github.event.action != 'closed' + runs-on: ubuntu-latest + + steps: + - name: Check out repository code + uses: actions/checkout@v4 + + - name: Set up Python 3.11 + uses: actions/setup-python@v5 + with: + python-version: '3.11' + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + + - name: Run tests with pytest + run: pytest + working-directory: ./7project/backend + build: name: Build and push image (reusable) uses: ./.github/workflows/build-image.yaml