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

No such file or directory for coverage files #5903

Closed
6 tasks done
C0ZEN opened this issue Jun 17, 2024 · 4 comments
Closed
6 tasks done

No such file or directory for coverage files #5903

C0ZEN opened this issue Jun 17, 2024 · 4 comments

Comments

@C0ZEN
Copy link

C0ZEN commented Jun 17, 2024

Describe the bug

I have flaky failing tests due to unfound coverage files, but only on the CI (GitHub actions).
I previously created a bug ticket that was supposedly fixed, yet I'm still having the same issues.

⎯⎯⎯⎯⎯⎯ Unhandled Error ⎯⎯⎯⎯⎯⎯⎯
Error:  Error: ENOENT: no such file or directory, open '/home/runner/actions-runner/_work/x/.tmp/coverage-9.json'
Error:  ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Error:  Serialized Error: { errno: -2, code: 'ENOENT', syscall: 'open', path: '/home/runner/actions-runner/_work/x/.tmp/coverage-9.json' }

Note that I use Nx to run the tests.

Reproduction

Complicated to reproduce.

System Info

System:
    OS: macOS 14.5
    CPU: (8) arm64 Apple M1 Pro
    Memory: 97.91 MB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.12.2 - ~/.asdf/installs/nodejs/20.12.2/bin/node
    npm: 10.5.0 - ~/.asdf/plugins/nodejs/shims/npm
    pnpm: 8.15.6 - /opt/homebrew/bin/pnpm
  Browsers:
    Brave Browser: 124.1.65.126
    Chrome: 125.0.6422.176
    Safari: 17.5
  npmPackages:
    @vitejs/plugin-react: 4.3.1 => 4.3.1 
    @vitest/coverage-v8: 1.6.0 => 1.6.0 
    @vitest/ui: 1.6.0 => 1.6.0 
    vite: 5.3.1 => 5.3.1 
    vitest: 1.6.0 => 1.6.0

Used Package Manager

npm

Validations

@C0ZEN
Copy link
Author

C0ZEN commented Jun 17, 2024

FYI @AriPerkkio, please let me know if there is something that I can do/test to help.

@AriPerkkio
Copy link
Member

We'll need a setup that can reproduce this issue.

Copy link

Hello @C0ZEN. Please provide a minimal reproduction using a GitHub repository or StackBlitz (you can also use examples). Issues marked with needs reproduction will be closed if they have no activity within 3 days.

@AriPerkkio
Copy link
Member

Note that I use Nx to run the tests.

Is it possible that Nx is running multiple vitest commands at the same time? Having more than one parallel Vitest runs could conflict in a way that other test run cleans up the coverage reports from previous run. You would need to make sure coverage.reportsDirectory is unique between the parallel test runs.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jun 21, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Jul 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants