codecov / codecov-exe

.exe report uploader for Codecov https://codecov.io
MIT License
25 stars 21 forks source link

GitHub Actions is not detected in 1.10 #100

Closed tinovyatkin closed 4 years ago

tinovyatkin commented 4 years ago

Hello,

When running on GitHub action the CI is not detected:

Chocolatey v0.10.15
Installing the following packages:
codecov
By installing you accept licenses for the packages.

codecov v1.10.0 [Approved]
codecov package files install completed. Performing other installation steps.
Extracting C:\ProgramData\chocolatey\lib\codecov\tools\Codecov-win7-x64.zip to C:\ProgramData\chocolatey\lib\codecov\tools...
C:\ProgramData\chocolatey\lib\codecov\tools
 ShimGen has successfully created a shim for codecov.exe
 The install of codecov was successful.
  Software installed to 'C:\ProgramData\chocolatey\lib\codecov\tools'

Chocolatey installed 1/1 packages. 
 See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).

              _____          _
             / ____|        | |
            | |     ___   __| | ___  ___ _____   __
            | |    / _ \ / _  |/ _ \/ __/ _ \ \ / /
            | |___| (_) | (_| |  __/ (_| (_) \ V /
             \_____\___/ \____|\___|\___\___/ \_/
                                         exe-1.10.0

2020-04-07 20:09:38 WRN No CI detected.
2020-04-07 20:09:39 INF Git detected.

Also, even when detected, as per source code, it will not set build id and build URL as your bash uploader is doing for GitHub Actions.

Example of real output of GitHub Action with Exe uploader: https://github.com/tinovyatkin/is-localhost-ip/pull/94/checks?check_run_id=568776531

My action YAML:

 - name: Upload coverage to Codecov (EXE)
        if: matrix.os == 'windows-latest'
        # https://github.com/codecov/codecov-exe/blob/master/Source/Codecov/Program/CommandLineOptions.cs
        run: |
          choco install codecov -y --no-progress
          codecov.exe -f "./coverage/coverage-final.json" -t ${{secrets.CODECOV_TOKEN}} --branch ${{ github.head_ref }} --pr ${{ github.event.number }} --build ${{ github.run_id }}

See full file at https://github.com/tinovyatkin/is-localhost-ip/blob/master/.github/workflows/test.yml

AdmiringWorm commented 4 years ago

Thank you for opening this issue, it seems that the conditions for detecting whether we are running on a GitHub action or not have changed.

I will get that corrected. Regarding the build-id and build URL, these were not possible to be set when I initially added the support for GitHub action and deserves an issue by itself (the changelog for this repo is generated from tagged issues).

github-actions[bot] commented 4 years ago

:tada: This issue has been resolved in version 1.11.0 :tada:

The release is available on:

Your friendly GitReleaseManager bot :package::rocket: