-
Hi, not sure what is happening. The action is failing but I can't extract any valuable error message. Basically the output table is not being printed in the comment and the actions fails although the test suite passes. The action was working fine for previous PR's until this one. I thought it was caused because this is the first one where the coverage threshold is not met, but we lowered the threshold just to check and is still failing. My action: name: CI Pipeline Node
on:
push:
branches: [main]
pull_request:
jobs:
run-unit-tests-with-coverage:
runs-on: ubuntu-latest
steps:
- name: checks-out repository under $GITHUB_WORKSPACE, so workflow can access it
uses: actions/checkout@v3
- name: Read package json to extract node version
id: read_package_json
uses: ./shared-gh-actions/actions/[email protected]
with:
path: ./package.json
- name: Setup node -> download and cache node and add it to the PATH, cache yarn dependencies
uses: actions/setup-node@v3
with:
node-version: '${{ fromJson(steps.read_package_json.outputs.file).engines.node }}'
cache: 'yarn'
- name: Install dependencies
uses: bahmutov/npm-install@v1
- uses: ArtiomTr/jest-coverage-report-action@v2
id: coverage
with:
package-manager: yarn
output: report-markdown
- uses: marocchino/sticky-pull-request-comment@v2
with:
message: ${{ steps.coverage.outputs.report }} The generic error: Error: The process '/opt/hostedtoolcache/node/16.17.1/x64/bin/npx' failed with exit code 1
Error: The process '/opt/hostedtoolcache/node/16.17.1/x64/bin/npx' failed with exit code 1
at th._setResult (/home/runner/work/_actions/ArtiomTr/jest-coverage-report-action/v2/dist/index.js:21:17898)
at th.CheckComplete (/home/runner/work/_actions/ArtiomTr/jest-coverage-report-action/v2/dist/index.js:21:17485)
at ChildProcess.<anonymous> (/home/runner/work/_actions/ArtiomTr/jest-coverage-report-action/v2/dist/index.js:21:16477)
at ChildProcess.emit (node:events:513:28)
at maybeClose (node:internal/child_process:1093:16)
at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5) Some pictures of what I guess are the relevant parts of the logs: First it shows this error but the action keeps running. The test suite passes. And then it finally outputs this: And finallly this. Here it says the test suite fails, but is not really the case as you can see in above pictures: |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 8 replies
-
Hello @egimenos 👋, Could you please attach a log archive here? It looks like jest hasn't exited successfully, possibly caused by a memory leak in asynchronous tests - when you start a promise and then forget to await it. That's how you can download the log archive: UPDATE: In case anyone is facing the same issue, here is a link to the comment thread, about how to fix these issues. |
Beta Was this translation helpful? Give feedback.
-
Hi @ArtiomTr , there it is, let me know if you need anything else. Thanks in advance! |
Beta Was this translation helpful? Give feedback.
Hello @egimenos 👋,
Could you please attach a log archive here? It looks like jest hasn't exited successfully, possibly caused by a memory leak in asynchronous tests - when you start a promise and then forget to await it. That's how you can download the log archive:
UPDATE: In case anyone is facing the same issue, here is a link to the comment thread, about how to fix these issues.