zgosalvez / github-actions-report-lcov

A Github Action to report the code coverage from LCOV files
https://github.com/marketplace/actions/report-lcov
MIT License
59 stars 45 forks source link

"github-token received is empty. Skipping writing a comment in the PR" Message #229

Open feelform opened 1 month ago

feelform commented 1 month ago

Github action: https://github.com/pinpoint-apm/pinpoint-node-agent/actions/runs/9959177348/job/27515379799?pr=196

Overall coverage rate:
  lines......: 78.6% (1635 of 2080 lines)
  functions..: 77.1% (340 of 441 functions)
  branches...: 60.8% (565 of 930 branches)
Uploading artifacts.
Starting artifact upload
For more detailed logs during the artifact upload process, enable step-debugging: https://docs.github.com/actions/monitoring-and-troubleshooting-workflows/enabling-debug-logging#enabling-step-debug-logging
Artifact name is valid!
Container for artifact "code-coverage-report" successfully created. Starting upload of file(s)
Total file count: 277 ---- Processed file #174 (62.8%)
Total size of all the files uploaded is 378871 bytes
File upload process has finished. Finalizing the artifact upload
Artifact has been finalized. All files have been successfully uploaded!

The raw size of all the files that were specified for upload is 1[96](https://github.com/pinpoint-apm/pinpoint-node-agent/actions/runs/9959177348/job/27515379799?pr=196#step:8:97)8149 bytes
The size of all the files that were uploaded is 378871 bytes. This takes into account any gzip compression used to reduce the upload size, time and storage

The coverage you uploaded succeeds, but you can't add comments.

I used my personal token and set it up like below.

name: CI

# Controls when the action will run. 
on: [push, pull_request]

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
  # This workflow contains a single job called "build"
  test:
    # The type of runner that the job will run on
    runs-on: ubuntu-latest
    strategy:
      matrix:
        node_version:
          - 14
          - 16
          - 18

    name: Node ${{ matrix.node_version }} on ubuntu-latest
    steps:
      # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
      - uses: actions/checkout@v3
      - name: setup node environment
        uses: actions/setup-node@v3
        with:
          node-version: ${{ matrix.node_version }}
      - run: npm install
      - run: npm test
      # - name: Lint
      #   run: npm run lint
      # - uses: jwgmeligmeyling/checkstyle-github-action@master
      #   with:
      #     path: '**/checkstyle-result.xml'
      #     token: ${{ secrets.UPLOAD_ARTIFACTS_GITHUB_TOKEN }}
      - name: Coverage
        run: npm run coverage
      - name: Setup LCOV
        uses: hrishikesh-kadam/setup-lcov@v1
      - name: Report coverage
        uses: zgosalvez/github-actions-report-lcov@v3
        with:
          coverage-files: coverage/lcov.info
          artifact-name: code-coverage-report
          github-token: ${{ secrets.UPLOAD_ARTIFACTS_GITHUB_TOKEN }}
          update-comment: true
0xDEnYO commented 1 month ago

I have the same issue. My token definitely has the right permissions and can be accessed by the code but I cant get it to run, neither with GITHUB_TOKEN nor with my personal one.

@zgosalvez any idea what could cause this?