Git Product home page Git Product logo

codecov-action's Issues

Need help: how to set parameter "file" for multiple reports

In my case, there are two coverage reports(UI_coverage.xml and Back_end_coverage.xml)。

The Doc. says:
image

I think it means that multiple reports are supported,
so I set "file" parameter like this:
image
And it could not work, what should I do?
image

Thanks

Token-free upload for public repositories

Are there plans to support commit-status-based uploads like on other CI providers?
Besides UX improvements, the recommended way of storing token as a secret doesn't seem to work on pull requests originating from forks, because secrets aren't available there.

Add support for optional directory

We are using codecov in a build which uses multiple source repositories (which we clone in addition to the default one) for which we upload codecov results for each repository. For this an optional 'directory' flag would be helpful, the action should do a cd to the specified directory before running the codecov.sh bash script

Add file path

There's currently no way to configure an option where a user can input a filepath to the coverage report

Build and tag Docker image

Tried running this action earlier, but using

steps:
- uses: actions/checkout@master
- uses: codecov/[email protected]
  with:
    token: ${{secrets.CODECOV_TOKEN}} #required
    file: ./coverage.xml #optional
    flags: unittests #optional
    name: codecov-umbrella #optional

it takes ages to build the Docker image.

What do you think about building and tagging an image, and then pushing it to Dockerhub?

This will significantly speed up actions!

Passing secrets.CODECOV_TOKEN not recognized

Having set up the secret CODECOV_TOKEN and passing it as ${{ secrets.CODECOV_TOKEN }} the upload fails with the message:

HTTP 400
Please provide the repository token to upload reports via `-t :repository-token`

This is both for v1 and v1.0.5 of codecov-action.

It seems that the action's environment variable CODECOV_TOKEN is not set properly or not recognized?

It should be mentioned that this has recently started failing, without changing the actions workflow otherwise, i.e., it used to work, but now throws this error.

Permit dashes in input flags

Currently if I try to use flags that have a dash this action will fail to upload after several retries. On the last one it will display this message:

flags must match pattern ^[\w\,]+$

This issue is basically a request to permit dashes (and maybe other characters too?) in the flags attached to the uploaded report. This will allow users to employ as a flag:

flags: ${{ matrix.os }}

which currently resolves to names like ubuntu-latest or windows-latest.

Use codecov action with a C++ project

I'm interested in porting a project that uses coveralls to codecov and therefor I'd like to use this action.
However, I'm struggling with the workflow file because I don't understand how to generate a proper report to send remotely.
Is there any example or have you any hint in this sense?

Thank you.

unable to upload coverage report

Hi, I am unable to upload the coverage report into codecov. Below is the image. Could it be possible that github block internet access?

Screenshot 2019-12-09 at 10 13 42 AM

doc: how to use multiple flags

The README/doc should have an example how to use multiple flags.
(I've guessed them to be a string separated by "," (commata), as with the codecov-bash uploader itself, but it would be good to clarify)

Bash script unable to find the codecov.sh file

I am getting some warnings when running the bash script. For details see this run (https://github.com/mobxjs/mobx.dart/commit/e23826ec853fdd0e2d85766683fd35c015b704df/checks?check_suite_id=411164231).

image

Logs:

2020-01-21T02:41:53.8844708Z Collecting coverage information...                                   9ms
2020-01-21T02:41:53.9724611Z ##[group]Run codecov/codecov-action@v1
2020-01-21T02:41:53.9724813Z with:
2020-01-21T02:41:53.9725566Z   token: ***
2020-01-21T02:41:53.9725663Z   flags: flutter_mobx
2020-01-21T02:41:53.9725764Z   file: ./flutter_mobx/coverage/lcov.info
2020-01-21T02:41:53.9725872Z env:
2020-01-21T02:41:53.9725976Z   FLUTTER_CMD: /home/cirrus/sdks/flutter/bin/flutter
2020-01-21T02:41:53.9726084Z ##[endgroup]
2020-01-21T02:41:53.9739646Z ##[command]/usr/bin/docker exec  305905f350f09395dcb969a93ac8d71ff2b6dc61d7804c5620f434d9a100882e sh -c "cat /etc/*release | grep ^ID"
2020-01-21T02:41:54.1419610Z Running JavaScript Action with default external tool: node12
2020-01-21T02:41:54.7536673Z ##[warning]Codecov warning: EACCES: permission denied, open 'codecov.sh'
2020-01-21T02:41:54.7555301Z [command]bash codecov.sh -f ./flutter_mobx/coverage/lcov.info -n  -F flutter_mobx -y 
2020-01-21T02:41:54.7610843Z bash: codecov.sh: No such file or directory
2020-01-21T02:41:54.7630281Z ##[warning]Codecov warning: The process 'bash' failed with exit code 127
2020-01-21T02:41:54.7636907Z ##[warning]Codecov warning: ENOENT: no such file or directory, unlink 'codecov.sh'
2020-01-21T02:41:54.7938034Z Stop and remove container: 6bd4f0de557b4711bc352ae56507ec96_cirrusciflutterstable_be1f99
2020-01-21T02:41:54.7974359Z ##[command]/usr/bin/docker rm --force 305905f350f09395dcb969a93ac8d71ff2b6dc61d7804c5620f434d9a100882e
2020-01-21T02:41:56.4006008Z 305905f350f09395dcb969a93ac8d71ff2b6dc61d7804c5620f434d9a100882e
2020-01-21T02:41:56.4033778Z Remove container network: github_network_9e3d22c0ef7449e39f710f9b147a5803
2020-01-21T02:41:56.4037594Z ##[command]/usr/bin/docker network rm github_network_9e3d22c0ef7449e39f710f9b147a5803
2020-01-21T02:41:56.5209386Z github_network_9e3d22c0ef7449e39f710f9b147a5803
2020-01-21T02:41:56.5238378Z Cleaning up orphan processes

Does not work when using alpine image

Container distribution is alpine. Running JavaScript Action with external tool: node12_alpine
bash codecov.sh -n phpunit-php7.4 -F phpunit -Z
##[error]Codecov failed with the following error: There was an error when attempting to execute the process 'bash'. This may indicate the process failed to start. Error: spawn bash ENOENT

https://github.com/teohhanhui/api-platform-core/runs/487602279?check_suite_focus=true#step:18:13

Actions written in JS are not really cross-platform... There's actions/toolkit#285 but it seems the problem here is simply that bash is not installed in the "external" container ("node12_alpine"), and I don't see a way to specify that bash is needed there, or to install it manually.

Incorrect installation docs

This is how the format for actions is:

userOrOrganization/repository@branchOrTag

You mistakenly wrote the organization as actions, instead of codecov in the readme usage section.

actions/checkout@master

This will cause builds to fail with a 404 installation error.

The `yml` optional input doesn't seem to be working

If I add the codecov.yml file to my project root, everything is working fine:

However, adding the file to ./.github/codecov.yml and properly configuring my workflow yml file doesn't seem to be working:

Although the action is saying it found the file, it doesn't seem to be used if you look at codecov.io it will say "No yaml found." and my settings are not being read.

Am I doing something wrong?

Github actions output of coverage url

Hello,

I am generating a code coverage with your action and the action produces a link in where I can check coverage result lastly. Along with Github Actions we are able to get outputs such as links. For instance, build scan generates a link that includes build result and I can get output link as follows.

steps.<steps_id>.outputs.build-scan-url

Do you support such method to provide a link of coverage result like

steps.<steps_id>.outputs.codecov-url

It would be great for me to share a link with my team.

Thanks,

CodeCov upload takes too long

In our C# repo we have ~2.5K LoC recognized and tracked by CodeCov.
For some reason it takes 21 minutes to process and upload coverage reports which is eating up our GH Actions runtime quota fast and disrupting CI workflow a bit.

Is it possible enable verbose logging and/or profiling so we can see what's going on and possibly do something about it?

2020-03-19T21:55:01.8693381Z ##[group]Run codecov/codecov-action@master
2020-03-19T21:55:01.8693640Z with:
2020-03-19T21:55:01.8702733Z   token: ***
2020-03-19T21:55:01.8702940Z   file: ./Build/TestReports/CodeCoverage.xml
2020-03-19T21:55:01.8703086Z   flags: unittests
2020-03-19T21:55:01.8703223Z   name: GitHub CI
2020-03-19T21:55:01.8703357Z   fail_ci_if_error: true
2020-03-19T21:55:01.8703503Z env:
2020-03-19T21:55:01.8703651Z   NUGET: C:\hostedtoolcache\windows\nuget.exe\5.4.0\x64/nuget.exe
2020-03-19T21:55:01.8703801Z ##[endgroup]
2020-03-19T21:55:02.3235015Z [command]bash codecov.sh -f ./Build/TestReports/CodeCoverage.xml -n "GitHub CI" -F unittests -Z
2020-03-19T21:55:02.7895459Z 
2020-03-19T21:55:02.7895986Z   _____          _
2020-03-19T21:55:02.7896309Z  / ____|        | |
2020-03-19T21:55:02.7896558Z | |     ___   __| | ___  ___ _____   __
2020-03-19T21:55:02.7896799Z | |    / _ \ / _` |/ _ \/ __/ _ \ \ / /
2020-03-19T21:55:02.7897035Z | |___| (_) | (_| |  __/ (_| (_) \ V /
2020-03-19T21:55:02.7897407Z  \_____\___/ \__,_|\___|\___\___/ \_/
2020-03-19T21:55:02.7897653Z                               Bash-tbd
2020-03-19T21:55:02.7897849Z 
2020-03-19T21:55:02.7897999Z 
2020-03-19T21:55:02.7905967Z �[0;90m==>�[0m GitHub Actions detected.
2020-03-19T21:55:03.0896193Z     �[0;90mproject root:�[0m D:/a/REDACTED
2020-03-19T21:55:03.0896831Z �[0;90m-->�[0m token set from env
2020-03-19T21:55:03.2889476Z     �[0;32mYaml not found, that's ok! Learn more at�[0m �[0;36mhttp://docs.codecov.io/docs/codecov-yaml�[0m
2020-03-19T21:55:03.5740792Z     �[0;90m->�[0m Found 1 reports
2020-03-19T21:55:03.5741536Z �[0;90m==>�[0m Detecting git/mercurial file structure
2020-03-19T21:55:03.7606349Z �[0;90m==>�[0m Reading reports
2020-03-19T21:55:03.8565040Z     �[0;32m+�[0m ./Build/TestReports/CodeCoverage.xml �[0;90mbytes=1661234�[0m
2020-03-19T21:55:03.9346856Z �[0;90m==>�[0m Appending adjustments
2020-03-19T21:55:03.9347537Z     �[0;36mhttp://docs.codecov.io/docs/fixing-reports�[0m
2020-03-19T22:16:04.3784923Z     �[0;32m+�[0m Found adjustments
2020-03-19T22:16:04.7537514Z �[0;90m==>�[0m Gzipping contents
2020-03-19T22:16:06.6778997Z �[0;90m==>�[0m Uploading reports
2020-03-19T22:16:06.6780116Z     �[0;90murl:�[0m https://codecov.io
2020-03-19T22:16:06.6780558Z     �[0;90mquery:�[0m branch=master&commit=REDACTED
2020-03-19T22:16:07.2128700Z     �[0;90m->�[0m Pinging Codecov
2020-03-19T22:16:07.2129847Z https://codecov.io/upload/v4?package=bash-tbd&token=REDACTED
2020-03-19T22:16:08.5617894Z     �[0;90m->�[0m Uploading
2020-03-19T22:16:09.4656495Z     �[0;32m->�[0m View reports at �[0;36mhttps://codecov.io/github/REDACTED�[0m
2020-03-19T22:16:09.4853853Z Cleaning up orphan processes

Conflicting error messages

I'm using the action to generate a codecov report for PRs here.

However, I'm getting the following error:

Yaml found at: ./codecov.yml
sed: can't read ././codecov.yml: No such file or directory
    -> Found 1 reports
==> Detecting git/mercurial file structure
==> Reading reports
    - file not found at ros2_ws/lcov/total_coverage.info
--> No coverage data found.
  1. Why is codecov saying that it found the file and then sed can't read it?
  2. Why does codecov say it found the file and then report that there is no coverage (when the coverage was in fact generated?

Thanks

Support for windows

Given that github can run windows (and macOs) builds on top of linux, it will be nice if the official codecov action can run on all three.

I see that there is codecov-exe , so I suppose this is being worked on ?

Ruby integration example

So I trying to replace old codecov integration in my projects (which worked fine) with Github Actions integration

My ruby.yml file looks like this:

name: Ruby
on: [push]
jobs:
  build:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        ruby: [2.4, 2.5, 2.6, 2.7, head]
    steps:
    - uses: actions/checkout@v2
    - name: Set up Ruby ${{ matrix.ruby }}
      uses: ruby/setup-ruby@v1
      with:
        ruby-version: ${{ matrix.ruby }}
    - name: Build and test with Rake
      run: |
        gem install bundler
        bundle config set without 'development'
        bundle install --jobs 4 --retry 3
        bundle exec rake
    - name: Send test coverage report to codecov.io
      uses: codecov/codecov-action@v1
      with:
        file: ./coverage/.resultset.json

There is no error in logs:
image

But after a go to codecov here:
https://codecov.io/gh/ShockwaveNN/pocket-sinatra-interface/commits
All I see this error:
image

Can you point out that I'm doing wrong?

undefined: command not found

Hi, in build https://github.com/felangel/bloc/actions/runs/36031254, job https://github.com/felangel/bloc/runs/432647943?check_suite_focus=true we are facing codecov.sh: line 1: undefined: command not found. (might be relevant to #48)

image

and Actions tells this

image

It has been randomly appearing across the action runs. From the log, this is an error from your action.

Note that this specific coverage file does not exist, but that should not throw this error I believe. Other jobs where the file also doesn't exist does this (correctly):

image

__init__.py files are ignored

When I use this action, init.py files are ignored but all the code is here so coverage become 100%.
I use codecov manually without this action everything works fine.

Don't rebuild container on each run

Currently the container is rebuilt each time the action is run which takes about 90 seconds. I think this is a limitation of GitHub Actions but maybe you could upload a built container to Docker Hub or GitHub Package Repository and point at that instead?

Incorrect handling of PR builds from GitHub Actions.

Summary from the customer:

I did a bit of looking today. It appears that pull_request events use an automatic merge commit for the pull request, and the GITHUB_SHA is showing that commit hash instead of the one for the commit on the branch that was actually pushed. It makes some sense, but it's a big odd to get your head around. I believe that Travis CI does the same thing, except that they make it easy to know what the underlying commit you're trying to test about is, but GitHub actions does not expose that in an environment variable.

In order to trace it back to the commit we're really trying to identify, we need to look at the parents of the commit we're on. I'm not sure the optimal way to do that, but the commit message of the current commit has it, and of course git itself has record of what the parent commits are as well, though I'm not totally sure the best way to figure out which of the parents is really the one we're looking for.

It seems that GitHub Actions may make a merge commit build for PRs, similar to how Travis CI does. I'm not sure if they commit this SHA, but the Codecov action does not use the correct SHA in this case.

adding environment variables

similar to how codecov-bash allows you to do

bash <(curl -s https://codecov.io/bash) -e FOO,BAR,SPAM

Could either be:

env_variables: [FOO, BAR, SPAM]

or a string using github actions substitutions:

variables: ${{ format('FOO=xxx,BAR={0},SPAM={1}', matrix.bar, matrix.spam) }}

Until this is implemented, is there any work around this? I really need to add env variables to uploads.

Can't use codecov action with swift project

I can't run codecov report for swift project. The tests are passed in my Xcode 11.3

Here is my GitHub Action workflow:

name: Swift

on: [push]

jobs:
  build:

    runs-on: macOS-latest

    steps:
    - uses: actions/checkout@v1
    - name: Build app
      run: swift build -v
    - name: Run tests
      run: swift test -v
    - uses: codecov/codecov-action@v1
      with:
        token: ${{ secrets.CODECOV_TOKEN }}
        fail_ci_if_error: true

It seems like codecov action try to start python tests here is a log screenshot:

image

Fixing timeouts

We're seeing timeouts when running out test suite.

How can we prevent that? Is there maybe rate limiting going on?

Screen Shot 2019-11-29 at 12 33 54 PM

Screen Shot 2019-11-29 at 12 34 22 PM

Why don't use Alpine image?

ubuntu:latest is cached in VM (ref). However, it still takes time with high IO.

Step 1/6 : FROM ubuntu:latest
latest: Pulling from library/ubuntu
5667fdb72017: Pulling fs layer
d83811f270d5: Pulling fs layer
ee671aafb583: Pulling fs layer
7fc152dfb3a6: Pulling fs layer
7fc152dfb3a6: Waiting
d83811f270d5: Verifying Checksum
d83811f270d5: Download complete
ee671aafb583: Verifying Checksum
ee671aafb583: Download complete
7fc152dfb3a6: Verifying Checksum
7fc152dfb3a6: Download complete
5667fdb72017: Verifying Checksum
5667fdb72017: Download complete
5667fdb72017: Pull complete

To shorten this, we can use Alpine.

"codecov.sh: line 1: undefined: command not found" on windows-latest

I have something like this in the configuration, but secrets.CODECOV_TOKEN is not configured yet:

jobs:
  test:
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os:
          - macos-latest
          - windows-latest
          - ubuntu-latest

    steps:
      # [test prep, test, etc., steps here]

      - name: Upload coverage report
        uses: codecov/codecov-action@v1
        with:
          token: ${{ secrets.CODECOV_TOKEN }}
          file: coverage.xml

Both on macos-latest and ubuntu-latest, I get an HTTP 400 error, which is fine. But on windows-latest, I get this:

Run codecov/codecov-action@v1
  with:
    file: coverage.xml
  env:
    pythonLocation: C:\hostedtoolcache\windows\Python\2.7.17\x64
##[warning]Codecov warning: connect ETIMEDOUT 35.199.43.247:443
bash codecov.sh -f coverage.xml -n "" -F "" -y ""
codecov.sh: line 1: undefined: command not found
##[warning]Codecov warning: The process 'bash' failed with exit code 127

More here.

Build does not fail with token and invalid input

With a given token and an invalid input, the build does not fail and completely disregards the bad input

with:
  token: xxxx
  badinput: badstuff

The above configuration passes as long as the token is correct

codecov unable to find coverage on PATH because env is not inherited

I'm currently facing an issue where codecov cannot find the Python coverage program on the PATH, and therefore does not process the coverage. I believe this is because of how index.js here manages the environ.

Specifically, it fully overrides it:

codecov-action/index.js

Lines 52 to 59 in a3a6bec

options.env = {
GITHUB_ACTION: process.env.GITHUB_ACTION,
GITHUB_RUN_ID: process.env.GITHUB_RUN_ID,
GITHUB_REF: process.env.GITHUB_REF,
GITHUB_REPOSITORY: process.env.GITHUB_REPOSITORY,
GITHUB_SHA: process.env.GITHUB_SHA,
GITHUB_HEAD_REF: process.env.GITHUB_HEAD_REF || ''
};

Based on reading the exec package's source, it's clear that this is the entire env provided, it is not merged with process.env.

I think the best way to handle this would be to merge these vars with process.env. At the very least, PATH needs to be inherited so tools can be found, otherwise you simply get the system default PATH.

Unexpected (?) "Please provide upload token from codecov.io with valid arguments

After a few successful uses of this action, I suddenly get the following error message:

Run codecov/[email protected]
  with:
  env:
    pythonLocation: /opt/hostedtoolcache/Python/3.7.4/x64
/usr/bin/docker run --name bb81ac7a28060c2a49beacb2ccf7bb13adce_d9298b --label 04bb81 
--workdir /github/workspace --rm -e pythonLocation -e INPUT_TOKEN -e INPUT_NAME -e 
INPUT_FILE -e INPUT_FLAGS -e HOME -e GITHUB_REF -e GITHUB_SHA -e 
GITHUB_REPOSITORY -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF 
-e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_WORKSPACE -e 
GITHUB_ACTION -e GITHUB_EVENT_PATH -e RUNNER_OS -e RUNNER_TOOL_CACHE -e 
RUNNER_TEMP -e RUNNER_WORKSPACE -v "/var/run/docker.sock":"/var/run/docker.sock" -v 
"/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp
/_github_workflow":"/github/workflow" -v "/home/runner/work/kikuchipy/kikuchipy":"/github
/workspace" 04bb81:ac7a28060c2a49beacb2ccf7bb13adce  "" "" "" ""
Please provide an upload token from codecov.io with valid arguments
##[error]Docker run failed with exit code 1

My .codecov.yml:

comment:
  layout: "diff, flags, files"

and .github/workflows/build.yml unchanged between the successful and unsuccessful action uses:

name: Build
on:
  pull_request:
    branches:
      - master
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@master
      - name: Setup Python
        uses: actions/setup-python@master
        with:
          python-version: 3.7
      - name: Install Miniconda
        run: |
          wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
          chmod +x miniconda.sh
          ./miniconda.sh -b -p $HOME/miniconda
          hash -r
      - name: Setup environment and install dependencies
        env:
          ENV_NAME: testenv
        run: |
          source $HOME/miniconda/bin/activate root
          conda config --append channels conda-forge
          conda create --name $ENV_NAME --yes
          conda activate $ENV_NAME
          conda info -a
          df -h
          conda install --yes hyperspy pyxem pytest pytest-cov
          pip install .
      - name: Run pytests and generate coverage report
        env:
          ENV_NAME: testenv
        run: |
          source $HOME/miniconda/bin/activate $ENV_NAME
          export MPLBACKEND=Agg
          pytest --cov=kikuchipy --cov-report=xml
      - name: Upload coverage report to Codecov
        uses: codecov/[email protected]
        with:
          token: ${{ secrets.CODECOV_TOKEN }}

The CODECOV_TOKEN available via codecov.io is registred in my settings.

I'm sorry if I missed anything obvious. Are anybody able to help me out? Thanks a lot in advance.

Add documentation on matrix build, only upload coverage once

When testing in a matrix, uploads often fail after the first one. I'm testing against different versions of Python, and I only need to upload the coverage information once, by including

if: matrix.python-version == 3.8

in the codecov job. It took me a while to figure this out, so maybe it is nice to include this in the readme.

Add flags

Add configuration where flags can be submitted by the user

find: 'gcov': No such file or directory

I tried to use this action on my C project and I got this:

https://github.com/isbadawi/badavi/commit/f14ae4f61dbed2b28c7a4c05168e3da3b26abc5e/checks?check_suite_id=315103590

==> GitHub Actions detected.
    project root: .
    Yaml found at: .codecov.yml
==> Running gcov in . (disable via -X gcov)
find: 'gcov': No such file or directory
find: 'gcov': No such file or directory
find: 'gcov': No such file or directory
==> Python coveragepy not found
==> Searching for coverage reports in:
    + .
--> No coverage report found.
    Please visit http://docs.codecov.io/docs/supported-languages
Codecov upload failed

It looks like gcov is not installed in the image. I worked around it by manually invoking the bash uploader -- I guess the GitHub-hosted environment has gcov.

Successful invocation: https://github.com/isbadawi/badavi/commit/ce9f937214ff55696a572dfff209af70c28cd533/checks?check_suite_id=315119018

400 error on uploading to Codecov

I've experienced a few errors with the following message:

Pinging Codecov
https://codecov.io/upload/v4?package=bash-20200214-585fef0&token=secret&branch=refs%2Fpull%2F105%2Fmerge&commit=65f5df278779f85ec4951d271f741ea963000f26&build=&build_url=http%3A%2F%2Fgithub.com%2Fopendatacube%2Fdatacube-explorer%2Factions%2Fruns%2F&name=&tag=&slug=opendatacube%2Fdatacube-explorer&service=github-actions&flags=&pr=&job=
HTTP 400
Please provide the repository token to upload reports via `-t :repository-token`

I'm configuring the action like this:

    - name: Upload coverage to Codecov
      uses: codecov/codecov-action@v1
      with:
        token: ${{ secrets.CodeCovToken }}
        file: ./coverage.xml
        fail_ci_if_error: false

And it works most of the time, as in, almost always. Just fails occassionally.

Is there a way to make this work with a PR from a fork

I have the codecov action working for PRs that I create in my repo, but it doesn't work for external contributors. I appears that secrets.CODECOV_TOKEN isn't getting set for external PRs. Is there anyway to get codecov working with PRs from forks?

All coverage uploads are made towards master

Uploading reports using this action results in the branch query parameter being empty and so CodeCov assumes that the commit belongs to master (even though it can't find it in the dashboard)

This is causing my badge to show incorrect values because now it's getting affected by coverage reports that are uploaded from other branches.

For now, I've stopped using the action and I'm instead using the bash uploader directly.

- name: Upload coverage
      if: success()
      run: bash <(curl -s https://codecov.io/bash) -t $TOKEN -B $REF
      env:
        TOKEN: "${{ secrets.CODECOV_TOKEN }}"
        REF: "${{ github.ref }}"

400: pr must match pattern

I got the following error when re-running a GH Actions workflow.

https://codecov.io/upload/v4?package=bash-20200303-bc4d7e6&token=secret&branch=tokenless_coverage_uploads&commit=46572a64ab028b892260fcb39096dcd766043e4a&build=52168147&build_url=http%3A%2F%2Fgithub.com%2Faiidateam%2Faiida-core%2Factions%2Fruns%2F52168147&name=aiida-pytests-py3.5-django&tag=&slug=aiidateam%2Faiida-core&service=github-actions&flags=django&pr=refs/heads/tokenless_coverage_uploads&job=
    -> Uploading
    X> Failed to upload
    -> Sleeping for 30s and trying again...
    -> Uploading to Codecov
    HTTP 400
pr must match pattern ^(\d+|false|null|undefined|true)$

It seems it doesn't catch the PR's number, but instead the reference head.

Using v1 with the following setup in my workflow:

    - name: Upload coverage report
      uses: codecov/codecov-action@v1
      with:
        name: aiida-pytests-py3.5-${{ matrix.backend }}
        flags: ${{ matrix.backend }}
        file: ./coverage.xml
        fail_ci_if_error: true

Looking through the issues and PRs here, it seems related to the usage of actions/checkout@v2 (based on the discussion #53 and #52).

From your most recent README, it's clear actions/checkout@master is recommended, but the fact that v2 does not work is not clear.

In addition, the CI job did not fail, even though the error above was thrown (and fail_ci_if_error: true was set).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.