fix_: dirs

This commit is contained in:
Igor Sirotin 2024-09-13 00:08:33 +01:00
parent b827674e0d
commit 9cd2d33117
No known key found for this signature in database
GPG Key ID: 425E227CAAB81F95
1 changed files with 10 additions and 10 deletions

View File

@ -1,5 +1,8 @@
#!/usr/bin/env bash
set -x
set -o nounset
GIT_ROOT=$(cd "${BASH_SOURCE%/*}" && git rev-parse --show-toplevel)
source "${GIT_ROOT}/_assets/scripts/colors.sh"
source "${GIT_ROOT}/_assets/scripts/codecov.sh"
@ -8,14 +11,16 @@ echo -e "${GRN}Running integration tests${RST}"
root_path="${GIT_ROOT}/integration-tests"
coverage_reports_path="${root_path}/coverage"
binary_coverage_reports_path="${coverage_reports_path}/binary"
merged_coverage_reports_path="${coverage_reports_path}/merged"
test_results_path="${root_path}/reports"
# Create directories
mkdir -p "${GIT_ROOT}/integration-tests/coverage"
# Cleanup any previous coverage reports
rm -rf "${coverage_reports_path:?}"/*
rm -rf "${test_results_path:?}"/*
rm -rf "${coverage_reports_path}"
# Create directories
mkdir -p "${binary_coverage_reports_path}"
mkdir -p "${merged_coverage_reports_path}"
all_compose_files="-f ${root_path}/docker-compose.anvil.yml -f ${root_path}/docker-compose.test.status-go.yml"
@ -38,13 +43,8 @@ docker-compose ${all_compose_files} down
# Prepare coverage reports
echo -e "${GRN}Gathering code coverage reports${RST}"
binary_coverage_reports_path="${coverage_reports_path}/binary"
merged_coverage_reports_path="${coverage_reports_path}/merged"
full_coverage_profile="${coverage_reports_path}/coverage.out"
# Clean merged reports directory
mkdir -p "${merged_coverage_reports_path}"
# Merge coverage reports
go tool covdata merge -i="${binary_coverage_reports_path}" -o="${merged_coverage_reports_path}"