From 4f59633b605e1fc805787dbce83b6b3ef15ab020 Mon Sep 17 00:00:00 2001 From: Benjamin Labrecque Date: Fri, 31 Jul 2026 10:51:23 +0200 Subject: [PATCH] fix services tests --- .gitea/workflows/deploy.yml | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index 32e439b..c741a86 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -4,6 +4,8 @@ on: push: branches: - main + # TODO: remove + - feature/add-services-tests-cicd tags: - 'prod' - 'v*' @@ -119,16 +121,12 @@ jobs: SERVICES="${{ steps.detect-services.outputs.services }}" for SERVICE in $SERVICES; do - SERVICE_DIR="services/$SERVICE" - if [ -d "$SERVICE_DIR/tests" ]; then - echo "==========================================" - echo "Running tests for: $SERVICE" - echo "==========================================" - - uv run --directory "$SERVICE_DIR" pytest - else - echo "Skipping $SERVICE (no tests directory found)..." - fi + SERVICE_APP_DIR="services/$SERVICE/current/app" + echo "==========================================" + echo "Running tests for: $SERVICE_APP_DIR" + echo "==========================================" + + uv run --directory "$SERVICE_APP_DIR" pytest done - name: Deploy Changed Services @@ -143,8 +141,5 @@ jobs: CHANGED_SERVICES=$(git diff --name-only "$BEFORE" "${{ github.sha }}" | awk -F/ '$1=="services" && $2!="" {print $2}' | sort -u) for SERVICE in $CHANGED_SERVICES; do - echo "==========================================" - echo "Deploying service: $SERVICE (${AGEBD_ENV})" - echo "==========================================" ./.gitea/scripts/deploy-and-restart-service.sh "${SERVICE}" "${AGEBD_ENV}" done