Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions .github/workflows/coverage-merge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,22 @@ jobs:

mapfile -t ut_profiles < <(find "${artifact_dir}" -type f -name 'ut-coverage.out' | sort)
mapfile -t bvt_profiles < <(find "${artifact_dir}" -type f -name 'bvt-*.out' | sort)
if [ "${#ut_profiles[@]}" -ne 1 ] || [ "${#bvt_profiles[@]}" -ne 2 ]; then
echo '::error::expected one UT profile and two BVT profiles'
if [ "${#ut_profiles[@]}" -ne 1 ]; then
echo '::error::expected exactly one UT profile'
find "${artifact_dir}" -type f -print || true
exit 1
fi
if [ '${{ github.base_ref }}' = 'main' ]; then
if [ "${#bvt_profiles[@]}" -ne 2 ]; then
echo '::error::expected two BVT profiles on main'
find "${artifact_dir}" -type f -print || true
exit 1
fi
elif [ "${#bvt_profiles[@]}" -eq 1 ] \
&& [ "$(basename "${bvt_profiles[0]}")" = 'bvt-standalone.out' ]; then
echo '::warning::merging coverage without the unsupported legacy Compose profile'
elif [ "${#bvt_profiles[@]}" -ne 2 ]; then
echo '::error::expected two BVT profiles, or the standalone profile alone on a legacy branch'
find "${artifact_dir}" -type f -print || true
exit 1
fi
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/e2e-compose-parallel.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,12 @@ jobs:
set -uo pipefail
coverage_dir="$GITHUB_WORKSPACE/coverage"
coverage_profile="$RUNNER_TEMP/bvt-compose.out"
compose_file="$GITHUB_WORKSPACE/etc/launch-tae-compose/compose.yaml"
if ! grep -Eq 'GOCOVERDIR=/coverage' "${compose_file}" \
|| ! grep -Eq 'coverage:/coverage' "${compose_file}"; then
echo '::warning::Compose BVT coverage is unsupported by this legacy branch; keeping the successful BVT result'
exit 0
fi
if go tool covdata textfmt -i="${coverage_dir}" -o "${coverage_profile}"; then
test -s "${coverage_profile}"
elif [ "${{ steps.bvt_on_pr_version.conclusion }}" = "success" ]; then
Expand Down