fix services tests

This commit is contained in:
Benjamin Labrecque
2026-07-31 10:51:23 +02:00
parent 04b9864ac6
commit 4f59633b60
+8 -13
View File
@@ -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