Update .gitea/workflows/test.yml
Run Pytest with HTML and XML Test Reports / tests (push) Successful in 41s

This commit is contained in:
2025-07-16 16:54:09 +02:00
parent ad8ba483cb
commit 6a584e8f51
+18 -22
View File
@@ -176,37 +176,36 @@ jobs:
- name: Copy reports into wiki
run: |
echo "📝 Creating wiki content..."
# Variables communes
SHORT_SHA=$(git rev-parse --short HEAD)
REPO_URL="https://gitea.psi.ch/tligui_y/slic"
RUN_LINK="${REPO_URL}/actions/runs/${GITHUB_RUN_NUMBER}"
SHORT_SHA=$(git rev-parse --short HEAD)
TEST_MD_FILE="run-${GITHUB_RUN_NUMBER}-TEST-REPORT-commit:-${SHORT_SHA}.md"
COVERAGE_MD_FILE="run-${GITHUB_RUN_NUMBER}-COVERAGE-commit:-${SHORT_SHA}.md"
# 1. Définir les noms de fichiers (structure fixe)
REPORT_PREFIX="run-${GITHUB_RUN_NUMBER}-commit-${SHORT_SHA}"
TEST_FILE="${REPORT_PREFIX}-TEST.md"
COVERAGE_FILE="${REPORT_PREFIX}-COVERAGE.md"
{
echo "## Test Report #${GITHUB_RUN_NUMBER}"
echo "[View CI run](${RUN_LINK}) | [Commit ${SHORT_SHA}](${REPO_URL}/commit/${SHORT_SHA})"
echo ""
cat ci-reports/markdown/TEST-REPORT.md
} > "wiki/${TEST_MD_FILE}"
# 2. Créer les fichiers de rapports
echo "Creating ${TEST_FILE}..."
echo "## Test Report #${GITHUB_RUN_NUMBER}" > "wiki/${TEST_FILE}"
echo "[View CI Run](${RUN_LINK}) | [Commit ${SHORT_SHA}](${REPO_URL}/commit/${SHORT_SHA})" >> "wiki/${TEST_FILE}"
cat ci-reports/markdown/TEST-REPORT.md >> "wiki/${TEST_FILE}"
{
echo "## Coverage Report #${GITHUB_RUN_NUMBER}"
echo "[View CI run](${RUN_LINK}) | [Commit ${SHORT_SHA}](${REPO_URL}/commit/${SHORT_SHA})"
echo ""
cat ci-reports/markdown/coverage-summary.md
} > "wiki/${COVERAGE_MD_FILE}"
echo "Creating ${COVERAGE_FILE}..."
echo "## Coverage Report #${GITHUB_RUN_NUMBER}" > "wiki/${COVERAGE_FILE}"
echo "[View CI Run](${RUN_LINK}) | [Commit ${SHORT_SHA}](${REPO_URL}/commit/${SHORT_SHA})" >> "wiki/${COVERAGE_FILE}"
cat ci-reports/markdown/coverage-summary.md >> "wiki/${COVERAGE_FILE}"
# 3. Mettre à jour Home.md
HOME_FILE="wiki/Home.md"
echo "Updating ${HOME_FILE}..."
{
echo "# Test Reports History"
echo ""
echo "## Latest Run"
echo "- [Test Report](${TEST_MD_FILE})"
echo "- [Coverage Report](${COVERAGE_MD_FILE})"
echo "- [Test Report](${TEST_FILE})"
echo "- [Coverage Report](${COVERAGE_FILE})"
echo ""
echo "## Previous Runs"
[ -f "${HOME_FILE}" ] && grep -A100 "## Previous Runs" "${HOME_FILE}" || echo "No previous runs"
@@ -218,9 +217,6 @@ jobs:
echo "=== Home.md ==="
cat "${HOME_FILE}"
echo "✅ Wiki content generated:"
ls -la wiki/
- name: Commit and push wiki
env:
CI_TOKEN: ${{ secrets.CI_TOKEN }}