barecheck / code-coverage-action

GitHub Action that generates code coverage reports
https://barecheck.com
MIT License
57 stars 14 forks source link

Failing to send summary [Error: read ETIMEDOUT] #269

Closed duckdum closed 2 months ago

duckdum commented 3 months ago

The gh action is failing with the following error: [Error: read ETIMEDOUT]. This seems to be related to a timeout issue occurring when attempting to send the test coverage summary comment. Notably, after excluding one of the files changed in the PR, the action successfully completed.

I suspect that the timeout might be due to the attempt to process or comment on the test coverage summary. Given the large number of uncovered lines in one of the files, it results in a timeout.

Steps Taken I have updated the Jest configuration as follows to get the action to work:

"jest": {
    "preset": "jest-expo",
    "setupFiles": [
      "./__mocks__/globals.js",
      "./__mocks__/genericMocks.js"
    ],
    "setupFilesAfterEnv": [
      "@testing-library/react-native/extend-expect"
    ],
    "coveragePathIgnorePatterns": [
      "<rootDir>/src/utils/GeneralUtils.js"
    ]
  }

GitHub Action Configuration

- name: Compare coverage reports and comment on PR
        id: code-coverage
        uses: barecheck/code-coverage-action@v1
        with:
          github-token: ${{ secrets.GITHUB_TOKEN }}
          barecheck-github-app-token: ${{ secrets.BARECHECK_GITHUB_APP_TOKEN }}
          lcov-file: './coverage/lcov.info'
          base-lcov-file: './lcov-base.info'
          send-summary-comment: true
          show-annotations: 'warning

Error: Screenshot 2024-05-21 at 12 19 32

Can someone help?

vitaliimelnychuk commented 3 months ago

Hello @duckdum , would you be able to share your lcov file?

Another question, Would you be able to try reinstalling Barecheck app?