Skip to content

Commit

Permalink
ci: fix coverage reporting via Codecov (#11018)
Browse files Browse the repository at this point in the history
refs: #10930

## Description

#10930 unintentionally removed some codecov file generation logic which resulted in a drop of overall coverage [here](https://app.codecov.io/github/Agoric/agoric-sdk?search=&trend=7%20days). This PR attempts to fix that by reincorporating those changes. 

### Security Considerations

None

### Scaling Considerations

None

### Documentation Considerations

None

### Testing Considerations

Fixes affected Codecov report

### Upgrade Considerations

None
  • Loading branch information
mergify[bot] authored Feb 19, 2025
2 parents f0fb3c8 + 454e302 commit 0123943
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/actions/post-test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ inputs:
runs:
using: composite
steps:
- name: collect coverage
shell: bash
if: ${{ github.repository_owner == 'agoric' }} && (success() || failure())
continue-on-error: true
run: |
./scripts/ci/collect-testruns.sh
- name: upload coverage prepare
shell: bash
id: coverage-prep
Expand Down
16 changes: 16 additions & 0 deletions scripts/ci/collect-testruns.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash
set -o xtrace
SCRIPT_DIR=$(cd ${0%/*} && pwd -P)

for cov in ./packages/**/coverage; do
# skip if unable to expand if there are no test files
if [[ $cov != "./packages/**/coverage" ]]; then
echo "processing $pkg"
(cd "$cov/../" && yarn run c8 report --reporter=lcov && find coverage -name "*.json" -delete)
fi
done

# if root coverage exists, ignore it
if [[ -d "coverage" ]]; then
rm -rf coverage
fi

0 comments on commit 0123943

Please sign in to comment.