Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

permission denied when running jest coverage in githubaction #510

Open
Hiep1210 opened this issue Sep 14, 2024 · 1 comment
Open

permission denied when running jest coverage in githubaction #510

Hiep1210 opened this issue Sep 14, 2024 · 1 comment

Comments

@Hiep1210
Copy link

I followed the guide and added this into my workflow yaml file:
test:
name: Run tests and collect coverage
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

  - name: Set up Node
    uses: actions/setup-node@v4

  - name: Install dependencies
    run: npm install

  - name: Run tests
    run: npx jest --coverage

  - name: Upload results to Codecov
    uses: codecov/codecov-action@v4
    with:
      token: ${{ secrets.CODECOV_TOKEN }}

The workflow failed and this was the log:
Run npx jest --coverage
sh: 1: jest: Permission denied
Error: Process completed with exit code 126.

I reread the guide and did not find anything mentioned about permission, how can i grant permission to run coverage for jest ?

@thomasrockhu-codecov
Copy link
Contributor

@Hiep1210 can you add a link to your CI run?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Waiting for: Product Owner
Development

No branches or pull requests

2 participants