Publish EUnit/CT HTML reports to ci-reports host.

Refs EventHub/EventHubBack#62
This commit is contained in:
2026-07-27 22:48:35 +03:00
parent cd619db4a2
commit 2bfce06dbf
10 changed files with 361 additions and 4 deletions
+34 -4
View File
@@ -114,12 +114,42 @@ jobs:
.
- name: Run unit tests (EUnit)
run: >
docker run --rm eventhub-tests:latest
rebar3 eunit --sname ci_eunit --verbose
id: eunit
run: |
set -euo pipefail
mkdir -p ci-out/eunit ci-out/eunit-html
set +e
docker run --rm \
-v "$PWD/ci-out/eunit:/app/logs/test/eunit" \
eventhub-tests:latest \
rebar3 eunit --sname ci_eunit --verbose
EUNIT_RC=$?
set -e
python3 scripts/junit-xml-to-html.py ci-out/eunit -o ci-out/eunit-html --title "EUnit CI" || true
exit "${EUNIT_RC}"
- name: Run API tests (local CT)
run: docker run --rm eventhub-tests:latest
id: ct
run: |
set -euo pipefail
mkdir -p ci-out/ct
docker run --rm \
-v "$PWD/ci-out/ct:/app/logs/test/ct" \
eventhub-tests:latest
- name: Publish HTML reports (ci-reports)
if: always()
run: |
set -euo pipefail
RUN_ID="${GITHUB_RUN_NUMBER:-local}"
mkdir -p /var/eventhub/ci-reports || sudo mkdir -p /var/eventhub/ci-reports || true
if [[ -d ci-out/eunit-html ]] && compgen -G 'ci-out/eunit-html/*' >/dev/null; then
bash scripts/publish-ci-report.sh EventHubBack "${RUN_ID}" eunit ci-out/eunit-html || true
fi
if [[ -d ci-out/ct ]] && compgen -G 'ci-out/ct/*' >/dev/null; then
bash scripts/publish-ci-report.sh EventHubBack "${RUN_ID}" ct ci-out/ct || true
fi
bash scripts/prune-ci-reports.sh || true
- name: Push tested eventhub image
if: github.event_name == 'push'