code-coverage-action icon indicating copy to clipboard operation
code-coverage-action copied to clipboard

Failing to send summary [Error: read ETIMEDOUT]

Open duckdum opened this issue 1 year ago • 0 comments

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?

duckdum avatar May 21 '24 11:05 duckdum