Fix coverage reporting with AZP. (#1273) (#1274)

ci_coverage
ci_complete

(cherry picked from commit f369956247)

Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
patchback[bot]
2026-06-04 06:00:16 +02:00
committed by GitHub
parent 9dfa8662a4
commit 64709ad8fe
4 changed files with 7 additions and 3 deletions
+2
View File
@@ -10,11 +10,13 @@ set -o pipefail -eu
entry_point="$1"
test="$2"
read -r -a coverage_branches <<< "$3" # space separated list of branches to run code coverage on for scheduled builds
agent_temp_directory="$4"
export COMMIT_MESSAGE
export COMPLETE
export COVERAGE
export IS_PULL_REQUEST
export COVERAGE_DESTINATION_DIRECTORY="${agent_temp_directory}/coverage"
if [ "${SYSTEM_PULLREQUEST_TARGETBRANCH:-}" ]; then
IS_PULL_REQUEST=true
+1 -1
View File
@@ -23,7 +23,7 @@ jobs:
- checkout: self
fetchDepth: $(fetchDepth)
path: $(checkoutPath)
- bash: .azure-pipelines/scripts/run-tests.sh "$(entryPoint)" "${{ job.test }}" "$(coverageBranches)"
- bash: .azure-pipelines/scripts/run-tests.sh "$(entryPoint)" "${{ job.test }}" "$(coverageBranches)" "$(Agent.TempDirectory)"
displayName: Run Tests
- bash: .azure-pipelines/scripts/process-results.sh
condition: succeededOrFailed()
+1 -1
View File
@@ -37,7 +37,7 @@ def update_azp_config(session: nox.Session) -> None:
session.debug(" ".join(command))
result = run_antsibull_nox(command)
if result != 0:
session.fail(f"Execution failed with status code {result}")
session.error(f"Execution failed with status code {result}")
# Allow to run the noxfile with `python noxfile.py`, `pipx run noxfile.py`, or similar.
+3 -1
View File
@@ -80,6 +80,8 @@ fi
export FORCE_COLOR=1
export ANTSIBULL_NOX_IGNORE_INSTALLED_COLLECTIONS="true"
export ANTSIBULL_NOX_ALWAYS_COPY_REPO_STRUCTURE="true" # https://github.com/ansible/ansible/issues/87052
export ANTSIBULL_NOX_COVERAGE_DESTINATION="${COVERAGE_DESTINATION_DIRECTORY}"
export ANTSIBULL_NOX_COVERAGE_ANALYSIS_FILE="${COVERAGE_DESTINATION_DIRECTORY}/coverage-analyze-targets.json"
export ANTSIBULL_NOX_COVERAGE_NO_XML="true"
nox -e "${nox_session}" -- ${COVERAGE}