Skip to content
This repository was archived by the owner on Dec 13, 2025. It is now read-only.
Open
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
17 changes: 13 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,19 @@ jobs:
- run: ls -R
- uses: HackingGate/lcov-reporter-action@a1c0d02b814fedd5aff86d9e7eac73834eb6e091
with:
lcov-base: ./coverage/lcov-base.info
lcov-file: ./coverage/lcov.info
- run: cat ./coverage/body.html
- name: Check if body.html exists
id: check_body
run: |
if [ -f ./coverage/body.html ]; then
echo "exists=true" >> $GITHUB_OUTPUT
cat ./coverage/body.html
else
echo "exists=false" >> $GITHUB_OUTPUT
echo "body.html not found, skipping coverage comment"
fi
- uses: actions/github-script@v6
if: steps.check_body.outputs.exists == 'true'
with:
script: |
fs = require('fs');
Expand All @@ -55,14 +64,14 @@ jobs:
console.log(error)
}
if (context.eventName === "pull_request") {
github.issues.createComment({
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: data
})
} else if (context.eventName === "push") {
github.repos.createCommitComment({
github.rest.repos.createCommitComment({
commit_sha: context.sha,
owner: context.repo.owner,
repo: context.repo.repo,
Expand Down