Skip to content
This repository was archived by the owner on Dec 13, 2025. It is now read-only.

Conversation

Copy link
Contributor

Copilot AI commented Dec 13, 2025

The codecov job was failing because it attempted to read ./coverage/body.html before verifying the file exists. The lcov-reporter-action doesn't guarantee this file's creation, especially when lcov-base references a non-existent comparison file.

Changes:

  • Remove lcov-base parameter from lcov-reporter-action (file doesn't exist)
  • Add conditional check for body.html existence before attempting to read
  • Make coverage comment step conditional on file presence
  • Update deprecated GitHub API calls (github.issues.*github.rest.issues.*)

Workflow behavior:

- 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'

The workflow now gracefully handles missing coverage reports instead of failing.

Original prompt

This section details on the original issue you should resolve

<issue_title>Fix codecov action failure</issue_title>
<issue_description>```log
Run cat ./coverage/body.html
cat: ./coverage/body.html: No such file or directory
Error: Process completed with exit code 1.


<agent_instructions>check github actions</agent_instructions>

## Comments on the Issue (you are @copilot in this section)

<comments>
</comments>


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: HackingGate <8541644+HackingGate@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix codecov action failure Fix codecov action failure due to missing body.html Dec 13, 2025
Copilot AI requested a review from HackingGate December 13, 2025 17:02
@HackingGate HackingGate marked this pull request as ready for review December 13, 2025 17:03
Copilot AI review requested due to automatic review settings December 13, 2025 17:03
@github-actions
Copy link

Coverage after merging copilot/fix-codecov-action-failure into master

72.73%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
Sources
   PublicIPAPI.swift65.31%100%75%64.44%20–21, 24–25, 28–29, 41–50
   SwiftPublicIP.swift82.35%100%66.67%85.71%21
Tests
   LinuxMain.swift100%100%100%100%
Tests/SwiftPublicIPTests
   SwiftPublicIPTests.swift72.56%100%69.23%73.60%104–108, 110–114, 116–120, 122–126, 128–132, 152–156, 17

1 similar comment
@github-actions
Copy link

Coverage after merging copilot/fix-codecov-action-failure into master

72.73%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
Sources
   PublicIPAPI.swift65.31%100%75%64.44%20–21, 24–25, 28–29, 41–50
   SwiftPublicIP.swift82.35%100%66.67%85.71%21
Tests
   LinuxMain.swift100%100%100%100%
Tests/SwiftPublicIPTests
   SwiftPublicIPTests.swift72.56%100%69.23%73.60%104–108, 110–114, 116–120, 122–126, 128–132, 152–156, 17

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix codecov action failure

2 participants