Skip to content

BUG: codecov tries to upload even when not asked to #109

Closed

Description

@pllim

Not all the jobs in astropy CI matrix compute coverage:

https://github.com/astropy/astropy/blob/92a3af78b409543aa85c8d82de17e81062347284/.github/workflows/ci_workflows.yml#L81-L83

But using the template here, codecov is trying to upload coverage file that does not exist and then fails:

https://github.com/astropy/astropy/actions/runs/4245732365/jobs/7381634730

['error'] There was an error running the uploader: No coverage files located, please try use `-f`, or change the project root with `-R`

This check is insufficient:

if: ${{ contains(matrix.coverage, 'codecov') && matrix.pytest == 'true' }}

Activity

  1. ConorMacBride commented on Feb 22, 2023

    @ConorMacBride
    Member

    This is working as expected. coverage: codecov is defined for all jobs here: https://github.com/astropy/astropy/blob/92a3af78b409543aa85c8d82de17e81062347284/.github/workflows/ci_workflows.yml#L52

    You can override your global setting and disable the upload for individual jobs by setting coverage: '':

            - name: Python 3.9 with all optional dependencies (MacOS X)
              macos: py39-test-alldeps
              posargs: --durations=50 --run-slow
              coverage: ''
  2. pllim commented on Feb 22, 2023

    @pllim
    ContributorAuthor

    Okay, thanks for the clarification!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions