Skip to content

Commit 1c9a926

Browse files
committed
One more time codecov, with love
1 parent e7e9d22 commit 1c9a926

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

.github/workflows/static_analysis_and_tests.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,17 @@ jobs:
5858
combineCoverage() {
5959
local artifact_dir=$1
6060
local repo_dir=$2
61+
# Extract the package directory path from the artifact name
62+
# coverage-lcov-vanilla -> ./vanilla
6163
local package_name=$(basename "$artifact_dir")
62-
escapedPath="$(echo $package_name | sed 's/\//\\\//g')"
64+
local package_dir="./${package_name#coverage-lcov-}"
65+
escapedPath="$(echo $package_dir | sed 's/\//\\\//g')"
6366
6467
if [[ -d "$artifact_dir" ]]; then
6568
# Find the lcov.info file in the artifact directory
6669
for lcov_file in "$artifact_dir"/*.info; do
6770
if [[ -f "$lcov_file" ]]; then
68-
echo "Combining coverage from $package_name"
71+
echo "Combining coverage from $package_dir"
6972
# combine line coverage info from package tests to a common file
7073
sed "s/^SF:lib/SF:$escapedPath\/lib/g" "$lcov_file" >> "$repo_dir/lcov.info"
7174
break
@@ -85,6 +88,9 @@ jobs:
8588
done
8689
8790
echo "Combined coverage file created:"
91+
ls -la lcov.info
92+
echo "First few lines of combined coverage:"
93+
head -10 lcov.info
8894
8995
- name: Upload coverage to Codecov
9096
uses: codecov/codecov-action@v5

0 commit comments

Comments
 (0)