coverallsapp / coverallsapp/github-action

path-to-lcov does not resolve $GITHUB_WORKSPACE

Open
#20 2 comments 0 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

I have been having issues getting the coverallsapp action to resolve the lcov file. I've tried getting dotnet test to write to the expected location but the action still couldn't find it. I assumed this was because the ./ path was being resolved differently across the different actions.

I updated my script to use absolute paths to get around this by specifying the lcov path as $GITHUB_WORKSPACE/coverage/lcov.info. The coverallsapp action still didn't find it when I used the workspace variable. If I put in the value of the variable then it does work.

For example, this fails to resolve the coverage file

    - name: Test
      run: dotnet test -c Release --no-build /p:CollectCoverage=true /p:CoverletOutput="$GITHUB_WORKSPACE/coverage/lcov.info" /p:MergeWith="$GITHUB_WORKSPACE/coverage/lcov.info" /p:CoverletOutputFormat=lcov                                                       

    - name: Coveralls
      uses: coverallsapp/github-action@master
      with:
        github-token: ${{ secrets.github_token }}
        path-to-lcov: $GITHUB_WORKSPACE/coverage/lcov.info

but this does find the file

    - name: Test
      run: dotnet test -c Release --no-build /p:CollectCoverage=true /p:CoverletOutput="$GITHUB_WORKSPACE/coverage/lcov.info" /p:MergeWith="$GITHUB_WORKSPACE/coverage/lcov.info" /p:CoverletOutputFormat=lcov                                                       

    - name: Coveralls
      uses: coverallsapp/github-action@master
      with:
        github-token: ${{ secrets.github_token }}
        path-to-lcov: /home/runner/work/Neovolve.CodeAnalysis.ChangeTracking/Neovolve.CodeAnalysis.ChangeTracking/coverage/lcov.info

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

Reproduce the workflow using the two shown path-to-lcov values and compare how the GitHub Action handles the literal $GITHUB_WORKSPACE value versus the expanded absolute path. Done means the action resolves the variable-based path and finds coverage/lcov.info in the example workflow.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions
Domain
ci-cd, testing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.