codecov / codecov-action

GitHub Action that uploads coverage to Codecov :open_umbrella:
https://www.codecov.io
MIT License
1.48k stars 207 forks source link

the dashboard shows coverage file being processing for few days #579

Closed shyandsy closed 1 year ago

shyandsy commented 2 years ago

my github action shows upload coverage file success

==> Uploader SHASUM verified (d95f0810d6e05d2eefaa0b9db6f9748c8ed3b1c3f0b513c713dbfc8ab591d236  codecov)
==> Running version latest
==> Running version v0.1.9
/home/runner/work/_actions/codecov/codecov-action/v2/dist/codecov -n  -Q github-action-2.1.0 -F ubuntu-latest -F go-1.17 -F nomsgpack
[2021-11-18T03:35:11.109Z] ['info'] 
     _____          _
    / ____|        | |
   | |     ___   __| | ___  ___ _____   __
   | |    / _ \ / _` |/ _ \/ __/ _ \ \ / /
   | |___| (_) | (_| |  __/ (_| (_) \ V /
    \_____\___/ \__,_|\___|\___\___/ \_/

  Codecov report uploader 0.1.12
[2021-11-18T03:35:11.116Z] ['info'] => Project root located at: /home/runner/work/ShyGinErrors/ShyGinErrors
[2021-11-18T03:35:11.116Z] ['info'] ->  Token found by environment variables
[2021-11-18T03:35:11.122Z] ['info'] Searching for coverage files...
[2021-11-18T03:35:11.146Z] ['info'] => Found 1 possible coverage files:
  coverage.out
[2021-11-18T03:35:11.146Z] ['info'] Processing /home/runner/work/ShyGinErrors/ShyGinErrors/coverage.out...
[2021-11-18T03:35:11.152Z] ['info'] Detected GitHub Actions as the CI provider.
[2021-11-18T03:35:11.153Z] ['info'] Pinging Codecov: https://codecov.io/upload/v4?package=github-action-2.1.0-uploader-0.1.12&token=*******&branch=main&build=1471218176&build_url=https%3A%2F%2Fgithub.com%2Fshyandsy%2FShyGinErrors%2Factions%2Fruns%2F1471218176&commit=29ff2cf1f31dfc9b1e5fcbeaceba6868cde37896&job=Run+Tests&pr=&service=github-actions&slug=shyandsy%2FShyGinErrors&name=&tag=&flags=ubuntu-latest%2Cgo-1.17%2Cnomsgpack&parent=
[2021-11-18T03:35:11.504Z] ['info'] Uploading...
[2021-11-18T03:35:11.669Z] ['info'] {"status":"success","resultURL":"https://codecov.io/github/shyandsy/ShyGinErrors/commit/29ff2cf1f31dfc9b1e5fcbeaceba6868cde37896"}

btw, the links in above cannot be opened

http 405
https://codecov.io/upload/v4?package=github-action-2.1.0-uploader-0.1.12&token=*******&branch=main&build=1471218176&build_url=https%3A%2F%2Fgithub.com%2Fshyandsy%2FShyGinErrors%2Factions%2Fruns%2F1471218176&commit=29ff2cf1f31dfc9b1e5fcbeaceba6868cde37896&job=Run+Tests&pr=&service=github-actions&slug=shyandsy%2FShyGinErrors&name=&tag=&flags=ubuntu-latest%2Cgo-1.17%2Cnomsgpack&parent=

http 410
https://codecov.io/github/shyandsy/ShyGinErrors/commit/29ff2cf1f31dfc9b1e5fcbeaceba6868cde37896

the codecov web page shows processing status for the commit image

and my badge in readme file shows 0% coverage image

Boshen commented 2 years ago

Found 1 possible coverage files: coverage.out

You need to upload the single .xml coverage file, nothing else.

shyandsy commented 2 years ago

@Boshen could you help to check the action file?

https://github.com/shyandsy/ShyGinErrors/blob/main/.github/workflows/test.yml

    steps:
      - name: Set up Go ${{ matrix.go }}
        uses: actions/setup-go@v2
        with:
          go-version: ${{ matrix.go }}

      - name: Checkout Code
        uses: actions/checkout@v2
        with:
          ref: ${{ github.ref }}

      - name: Go report card
        uses: creekorful/goreportcard-action@v1.0

      - uses: actions/cache@v2
        with:
          path: |
            ${{ matrix.go-build }}
            ~/go/pkg/mod
          key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
          restore-keys: |
            ${{ runner.os }}-go-
      - name: Run Tests
        run: make test

      - name: Upload coverage to Codecov
        uses: codecov/codecov-action@v2
        with:
          token: ${{secrets.CODECOV_TOKEN}}
          flags: ${{ matrix.os }},go-${{ matrix.go }},${{ matrix.test-tags }}
Boshen commented 2 years ago

@shyandsy Take a look at the accepted files, https://docs.codecov.com/docs/supported-report-formats You need to generate one of these accepted files.