Skip to content

No coverage files found #537

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

Closed
YonatanKra opened this issue Sep 22, 2021 · 10 comments
Closed

No coverage files found #537

YonatanKra opened this issue Sep 22, 2021 · 10 comments

Comments

@YonatanKra
Copy link

Hi,
I'm running the action like this:

with:
    directory: /home/runner/work/vivid-cli/vivid-cli/coverage/
    token: ***
    fail_ci_if_error: true
    files: ./clover.xml
    flags: unittests
    name: codecov-umbrella

I'm getting an error: There was an error running the uploader: No coverage files found, exiting.

I also tried the directory path as ./coverage/ but to no avail.

When I ls the ./coverate/ folder, I see the file exists:

> ls ./coverage
clover.xml
coverage-final.json
lcov-report
lcov.info

Any idea on how to solve this?

@thomasrockhu
Copy link
Contributor

@YonatanKra have you tried without specifying directory or files? Or just files: coverage/clover.xml?

@izelnakri
Copy link

izelnakri commented Sep 29, 2021

Hi @thomasrockhu I have the same problem. When I do:

codecov -f coverage/lcov.info -t $MY_TOKEN

it works but this github action responds with:

      - name: Upload code coverage to codecov
        uses: codecov/codecov-action@v2
        with:
          token: ${{ secrets.CODECOV_TOKEN }}
          files: coverage/lcov.info
          flags: js_open_source
          name: memoria
          verbose: true

[2021-09-29T12:40:26.420Z] ['error'] There was an error running the uploader: No coverage files found, exiting.

This is very, very disappointing..

Example CI run: https://github.com/izelnakri/memoria/runs/3744223692?check_suite_focus=true

@thomasrockhu
Copy link
Contributor

@izelnakri I noticed that the CI run you posted doesn't have the files section. Is there one that does?

Also, do you have a run of codecov -f coverage/lcov.info ...?

@izelnakri
Copy link

Yes I tried all the cases, and spent several hours learning/investigating codecov packages/ecosystem still no success. There needs to be certain simplications/better simple decisions in the future, which signals a room for improvement in codecov development team:

  • In the UI it wasnt clear that I had to enable a project to get an upload token, instead I was trying to use my API token to publish the coverage reports. Also homepage wasnt fully clear to me what value codecov brings other than html reports generated by test reports/base codecov tools -> big UX problem.

  • Instead of the current YAML config, codecov could provide an actions package with codecov binary, this removes a learning & deprecation curve and makes everything easier to debug, currently verbose mode doesnt help much -> DX failure.

Onboarding and tools need to get better.

@thomasrockhu
Copy link
Contributor

@izelnakri totally get it, I realize that it's frustrating to get this working for you right now. I asked for the CI runs above so that I could help debug the issue for you. If you could provide those runs, that would be very helpful.

@izelnakri
Copy link

izelnakri commented Sep 30, 2021

Hi @thomasrockhu the CI build I linked is completely containerized and by telling this to you now I realized what could be the problem :) However my suggestions above are valid, the error output should have been clear here: https://github.com/izelnakri/memoria/runs/3748652052?check_suite_focus=true

With this bug I just found an even bigger issue, this github action doesn't work in containerized environments. I'm also hitting right now this issue on my container when I try to do codecov -f coverage/lcov.info ... a better error message for this git missing(while it isnt) would be also helpfu: codecov/codecov-node#89

@vindigram
Copy link

I had the same issue, but just now got it to work by specifying the whole path for files and commenting out directory.
I hope this helps and works for you, too @izelnakri . Even if it's not really a fix and defeats the purpose of the directory parameter.

Before finding the workaround, I tried the version from the README.md (directory: ./some/path/, files: ./file.xml) and files: ./some/path/file.xml.

@zerothi
Copy link

zerothi commented Jan 6, 2022

I have the same problem with a directory specified, but nothing is uploaded "no files found".

@ben-spiller
Copy link

I have what looks like the same problem - my GH Action workflow uploads correctly on linux, but on Windows the same workflow fails with:

[2022-01-19T16:48:07.120Z] ['verbose'] Preparing to clean the following coverage paths: D:/a/xpybuild/xpybuild/tests/__coverage_python.win-py3.10/coverage.xml [2022-01-19T16:48:07.121Z] ['error'] There was an error running the uploader: Error while cleaning paths. No paths matched existing files! [2022-01-19T16:48:07.121Z] ['verbose'] The error stack is: Error: Error while cleaning paths. No paths matched existing files! at cleanCoverageFilePaths (C:\snapshot\project\dist\src\helpers\files.js) at main (C:\snapshot\project\dist\src\index.js) at processTicksAndRejections (node:internal/process/task_queues:96:5) [2022-01-19T16:48:07.121Z] ['verbose'] End of uploader: 159 milliseconds Error: Codecov: Failed to properly upload: The process 'D:\a\_actions\codecov\codecov-action\v2.0.2\dist\codecov.exe' failed with exit code 4294967295

I'm specifying the coverage.xml file with "files: " and not using "directory: "

@thomasrockhu-codecov
Copy link
Contributor

Closing out due to age. If you are still experiencing an issue, please open a topic on our community boards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants