Stuck on npm install
drilonibrahimi opened this issue ยท 4 comments
Describe a bug
Hi @ArtiomTr,
I'm facing this issue where the action script is not working as expected, it's getting stucked on npm install
! Please see the attached images.
Any hints on why is this happening?
Expected behavior
Details
-
Action version: v2
-
OS, where your action is running (windows, linux): ubuntu_latest
-
action.yml file
``` steps: - name: Checkout this repo uses: actions/checkout@v3 - name: Generate coverage report uses: artiomtr/jest-coverage-report-action@v2 with: github-token: * ```
-
Screenshots
</details>
Additional context
Update 1)
13 mins with no response, I had to cancel the job since either way we can't have this take any longer than 1-2 mins.
Hello @drilonibrahimi ๐,
Looks like this is an issue with npm. Maybe it is related to the old npm version, can you please try to bump the NodeJS version (or just npm), like so:
steps:
- name: Checkout this repo
uses: actions/checkout@v3
- name: Setup NodeJS 18.x
uses: actions/setup-node@v3
with:
node-version: 18.x
- name: Setup npm 9.6.5
run: corepack enable && corepack prepare npm@9.6.5 --activate
- name: Generate coverage report
uses: artiomtr/jest-coverage-report-action@v2
with:
github-token: *
If it doesn't work, you can try to apply the fixes described here.
Okay, that worked but I found out that I can skip the install step and the coverage report generation since I already did that on a previous job, nonetheless thanks for your response. I'm using this action only for reporting the coverage to the Pull Request
For anyone who might need this.
- name: Generate coverage report
uses: artiomtr/jest-coverage-report-action@v2.2.3
with:
github-token: *
skip-step: all
coverage-file: report.json
base-coverage-file: report.json
Okay, that worked but I found out that I can skip the install step and the coverage report generation since I already did that on a previous job, nonetheless thanks for your response. I'm using this action only for reporting the coverage to the Pull Request
For anyone who might need this.
- name: Generate coverage report uses: artiomtr/jest-coverage-report-action@v2.2.3 with: github-token: * skip-step: all coverage-file: report.json base-coverage-file: report.json
@drilonibrahimi This issue is closed but I just wanted to add that this worked great! I generate the report before as well via yarn coverage
and then just execute the posted settings. I had a lot of errors in regards to installing npm packages since I use private packages and then it would still try to install them although i was skipping the step. Now this works. Thanks for this!