mirror of
https://github.com/Kingsrook/qqq.git
synced 2025-07-18 05:01:07 +00:00
Add script to collect JaCoCo reports and update CircleCI config to use it
This commit is contained in:
26
.circleci/collect-jacoco-reports.sh
Executable file
26
.circleci/collect-jacoco-reports.sh
Executable file
@ -0,0 +1,26 @@
|
||||
#!/bin/bash
|
||||
|
||||
############################################################################
|
||||
## Script to collect all JaCoCo reports from different modules into a
|
||||
## single directory for easier artifact storage in CI.
|
||||
############################################################################
|
||||
|
||||
mkdir -p /home/circleci/jacoco-reports/
|
||||
|
||||
##############################################################
|
||||
## Find all module directories that have target/site/jacoco ##
|
||||
##############################################################
|
||||
for module_dir in */; do
|
||||
if [ -d "${module_dir}target/site/jacoco" ]; then
|
||||
module_name=$(basename "${module_dir%/}")
|
||||
target_dir="/home/circleci/jacoco-reports/${module_name}"
|
||||
|
||||
echo "Collecting JaCoCo reports for module: ${module_name}"
|
||||
|
||||
cp -r "${module_dir}target/site/jacoco" "${target_dir}"
|
||||
|
||||
echo "Copied JaCoCo reports for ${module_name} to ${target_dir}"
|
||||
fi
|
||||
done
|
||||
|
||||
echo "All JaCoCo reports collected to /home/circleci/jacoco-reports/"
|
@ -36,9 +36,13 @@ commands:
|
||||
name: Run Maven Verify
|
||||
command: |
|
||||
mvn -s .circleci/mvn-settings.xml -T4 --no-transfer-progress verify
|
||||
- run:
|
||||
name: Collect JaCoCo reports
|
||||
command: .circleci/collect-jacoco-reports.sh
|
||||
when: always
|
||||
- store_artifacts:
|
||||
name: Store Jacoco reports
|
||||
path: "*/target/site/jacoco/"
|
||||
path: /home/circleci/jacoco-reports
|
||||
destination: jacoco-reports
|
||||
when: always
|
||||
- run:
|
||||
name: Concatenate test output files
|
||||
|
Reference in New Issue
Block a user