Add quality gate workflow 14.
This commit is contained in:
committed by
vitor-aignosi
parent
a07c108595
commit
b970f54dea
13
.github/workflows/quality-gate.yml
vendored
13
.github/workflows/quality-gate.yml
vendored
@@ -75,7 +75,20 @@ jobs:
|
|||||||
|
|
||||||
- name: 🧪 Run Tests with Pytest
|
- name: 🧪 Run Tests with Pytest
|
||||||
run: |
|
run: |
|
||||||
|
set +e
|
||||||
pytest tests --junitxml=pytest.xml --cov=scouter --cov-report=xml --cov-report=term
|
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
|
- name: 📊 Run SonarQube Analysis
|
||||||
env:
|
env:
|
||||||
|
|||||||
Reference in New Issue
Block a user