ci(atlasbot): emit test data even when style checks fail

This commit is contained in:
jenkins 2026-04-20 10:49:38 -03:00
parent 9e15badcb1
commit b9970d3847

28
Jenkinsfile vendored
View File

@ -221,6 +221,9 @@ PY
docker buildx build --platform "${TEST_PLATFORM_RESOLVED}" --target test --load -t atlasbot-test . docker buildx build --platform "${TEST_PLATFORM_RESOLVED}" --target test --load -t atlasbot-test .
prep_rc=$? prep_rc=$?
docs_rc=1 docs_rc=1
loc_rc=1
tests_rc=1
coverage_contract_rc=1
gate_rc=1 gate_rc=1
if [ "${prep_rc}" -eq 0 ]; then if [ "${prep_rc}" -eq 0 ]; then
docker run --rm -v "$PWD/build:/out" atlasbot-test \ docker run --rm -v "$PWD/build:/out" atlasbot-test \
@ -233,17 +236,24 @@ PY
else else
docs_rc=${ruff_rc} docs_rc=${ruff_rc}
fi fi
docker run --rm -v "$PWD/build:/out" atlasbot-test \
python scripts/check_file_sizes.py --root atlasbot --max-lines 500
loc_rc=$?
docker run --rm -v "$PWD/build:/out" atlasbot-test \
python -m slipcover --json --out /out/coverage.json --source atlasbot --fail-under 95 \
-m pytest -q --junitxml /out/junit.xml
tests_rc=$?
docker run --rm -v "$PWD/build:/out" atlasbot-test \
python scripts/check_coverage.py /out/coverage.json --root atlasbot --threshold 95
coverage_contract_rc=$?
fi fi
printf '%s\n' "${docs_rc}" > build/docs-naming.rc printf '%s\n' "${docs_rc}" > build/docs-naming.rc
if [ "${prep_rc}" -eq 0 ] && [ "${docs_rc}" -eq 0 ]; then if [ "${prep_rc}" -eq 0 ]; then
docker run --rm -v "$PWD/build:/out" atlasbot-test \ gate_rc=0
python scripts/check_file_sizes.py --root atlasbot --max-lines 500 \ [ "${docs_rc}" -eq 0 ] || gate_rc=1
&& docker run --rm -v "$PWD/build:/out" atlasbot-test \ [ "${loc_rc}" -eq 0 ] || gate_rc=1
python -m slipcover --json --out /out/coverage.json --source atlasbot --fail-under 95 \ [ "${tests_rc}" -eq 0 ] || gate_rc=1
-m pytest -q --junitxml /out/junit.xml \ [ "${coverage_contract_rc}" -eq 0 ] || gate_rc=1
&& docker run --rm -v "$PWD/build:/out" atlasbot-test \
python scripts/check_coverage.py /out/coverage.json --root atlasbot --threshold 95
gate_rc=$?
fi fi
set -e set -e
printf '%s\n' "${gate_rc}" > build/quality-gate.rc printf '%s\n' "${gate_rc}" > build/quality-gate.rc