coverallsapp / coverallsapp/github-action

TypeError: Cannot read property 'includes' of undefined

Open
#115 0 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
No language data
Stars
520
Forks
78
PR merge metrics
No merged PRs in 30d

Description

Trying to upload a file fails with no information:

# ...
    - name: Upload coverage
      uses: coverallsapp/github-action@1.1.3
      with:
        flag-name: "Unit"
        github-token: ${{ secrets.GITHUB_TOKEN }}
        path-to-lcov: "./target/debug/lcov.info"
# ...
Using lcov file: ./target/debug/lcov.info
/__w/_actions/coverallsapp/github-action/1.1.3/node_modules/coveralls/lib/convertLcovToCoveralls.js:43
  if (file.includes('!')) {
           ^

TypeError: Cannot read property 'includes' of undefined
    at cleanFilePath (/__w/_actions/coverallsapp/github-action/1.1.3/node_modules/coveralls/lib/convertLcovToCoveralls.js:43:12)
    at /__w/_actions/coverallsapp/github-action/1.1.3/node_modules/coveralls/lib/convertLcovToCoveralls.js:106:[19](https://github.com/edgarogh/typed-dialogflow/runs/5720549956?check_suite_focus=true#step:6:19)
    at Array.forEach (<anonymous>)
    at /__w/_actions/coverallsapp/github-action/1.1.3/node_modules/coveralls/lib/convertLcovToCoveralls.js:105:12
    at walkFile (/__w/_actions/coverallsapp/github-action/1.1.3/node_modules/lcov-parse/lib/index.js:106:9)
    at /__w/_actions/coverallsapp/github-action/1.1.3/node_modules/lcov-parse/lib/index.js:115:[20](https://github.com/edgarogh/typed-dialogflow/runs/5720549956?check_suite_focus=true#step:6:20)
    at suppressedCallback (fs.js:[21](https://github.com/edgarogh/typed-dialogflow/runs/5720549956?check_suite_focus=true#step:6:21)5:5)
    at FSReqCallback.oncomplete (fs.js:156:[23](https://github.com/edgarogh/typed-dialogflow/runs/5720549956?check_suite_focus=true#step:6:23))

The lcov file exists according to ls. It was produced by grcov but your action doesn't indicate any parsing errors so I guess it is correct. There's no official information on how to support Rust so I'm using grcov's docs and a bit of guessing to make things work. The error seems to be related to convertLcovToCoveralls but there isn't a way to directly upload the coveralls JSON file produced by grcov (#104).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the failing coveralls/lib/convertLcovToCoveralls.js path shown in the stack trace and reproduce the upload using the provided workflow and grcov-generated lcov file. Compare the generated LCOV entries with what the parser expects; done means the Rust coverage file uploads without the TypeError or reports a useful parsing error.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, rust
Domain
ci-cd, testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.