Add quality gate workflow 14.

This commit is contained in:
Bruno Domingues
2025-05-14 15:36:07 -03:00
committed by vitor-aignosi
parent a07c108595
commit b970f54dea

View File

@@ -75,7 +75,20 @@ jobs:
- name: 🧪 Run Tests with Pytest
run: |
set +e
pytest tests --junitxml=pytest.xml --cov=scouter --cov-report=xml --cov-report=term
PYTEST_EXIT_CODE=$?
set -e
if [ $PYTEST_EXIT_CODE -eq 0 ]; then
echo "Pytest executado com sucesso."
elif [ $PYTEST_EXIT_CODE -eq 5 ]; then
echo "Pytest finalizado com código 5 (Nenhum teste encontrado). Tratando como sucesso para este workflow."
exit 0
else
echo "Pytest falhou com código de saída $PYTEST_EXIT_CODE."
exit $PYTEST_EXIT_CODE
fi
- name: 📊 Run SonarQube Analysis
env: