Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v4 upgrade] Config file codecov.yml not found, or is not a file. Ignoring config #1242

Closed
CodeBlanch opened this issue Jan 31, 2024 · 6 comments · Fixed by #1245
Closed
Assignees

Comments

@CodeBlanch
Copy link

Upgrading to v4 I'm getting a warning:

warning - 2024-01-31 20:00:18,693 -- Config file codecov.yml not found, or is not a file. Ignoring config.

Our codecov.yml currently lives in ./.github/codecov.yml: https://github.com/open-telemetry/opentelemetry-dotnet/blob/main/.github/codecov.yml

Is there a way to pass the correct path? I tried to use xtra_args but it doesn't seem to work:

    - name: Upload code coverage ${{ inputs.code-cov-prefix }}-${{ inputs.code-cov-name }}
      uses: codecov/codecov-action@v4
      continue-on-error: true # Note: Don't fail for upload failures
      env:
        OS: ${{ matrix.os }}
        TFM: ${{ matrix.version }}
        token: ${{ secrets.CODECOV_TOKEN }}
      with:
        file: TestResults/Cobertura.xml
        env_vars: OS,TFM
        flags: ${{ inputs.code-cov-prefix }}-${{ inputs.code-cov-name }}
        name: Code Coverage for ${{ inputs.code-cov-prefix }}-${{ inputs.code-cov-name }} on [${{ matrix.os }}.${{ matrix.version }}]
        xtra_args: --codecov-yml-path=./.github/codecov.yml

Warning: Unexpected input(s) 'xtra_args', valid inputs are ['token', 'file', 'files', 'commit_parent', 'directory', 'dry_run', 'env_vars', 'exclude', 'fail_ci_if_error', 'flags', 'name', 'os', 'override_branch', 'override_build', 'override_commit', 'override_pr', 'plugin', 'plugins', 'root_dir', 'slug', 'url', 'verbose', 'version', 'working-directory']

@thomasrockhu-codecov thomasrockhu-codecov self-assigned this Jan 31, 2024
@thomasrockhu-codecov
Copy link
Contributor

@CodeBlanch let me take a look into making a patch for this!

@thomasrockhu-codecov
Copy link
Contributor

@CodeBlanch 4.0.1 should allow for this change

It is not ideal, since we should be finding the codecov.yml file as you have mentioned. I have opened a ticket here.

You should be able to do something like

    - name: Upload code coverage ${{ inputs.code-cov-prefix }}-${{ inputs.code-cov-name }}
      uses: codecov/codecov-action@v4
      continue-on-error: true # Note: Don't fail for upload failures
      env:
        OS: ${{ matrix.os }}
        TFM: ${{ matrix.version }}
        CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
      with:
        file: TestResults/Cobertura.xml
        codecov_yml_path: .github/codecov.yml
        env_vars: OS,TFM
        flags: ${{ inputs.code-cov-prefix }}-${{ inputs.code-cov-name }}
        name: Code Coverage for ${{ inputs.code-cov-prefix }}-${{ inputs.code-cov-name }} on [${{ matrix.os }}.${{ matrix.version }}]

@CodeBlanch
Copy link
Author

@thomasrockhu-codecov The fixed worked thanks!

@Jamim
Copy link

Jamim commented Feb 1, 2024

Hello everyone,

I believe this issue is worth to be reopened since it's an obvious regression, so it might be closed once codecov/codecov-cli#365 is resolved or the action itself takes care of passing the right path to the cli.

@thomasrockhu-codecov
Copy link
Contributor

I agree with this, thanks @Jamim

@thomasrockhu-codecov
Copy link
Contributor

Closing as this was shipped as part of the underlying CLI 0.4.6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants