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

Update coverage.yml #500

Merged
merged 4 commits into from
Jul 2, 2024
Merged

Conversation

sbryngelson
Copy link
Member

Make coverage more robust / deal with upload issues more gracefully.

@sbryngelson sbryngelson added the continuous-integration Continuous integration (CI) label Jul 2, 2024
@sbryngelson
Copy link
Member Author

sbryngelson commented Jul 2, 2024

@okBrian there seems to be a problem with codecov causing the CI to fail quite often.

Related github issue
codecov/codecov-action#1292

You can see it here
https://github.com/MFlowCode/MFC/actions/runs/9763795526/job/26950550860?pr=500

==> Running version latest
gpg: directory '/home/runner/.gnupg' created
gpg: keybox '/home/runner/.gnupg/pubring.kbx' created
gpg: /home/runner/.gnupg/trustdb.gpg: trustdb created
gpg: key 806BB28AED779869: public key "Codecov Uploader (Codecov Uploader Verification Key) <[email protected]>" imported
gpg: Total number processed: 1
gpg:               imported: 1

gpg: Signature made Sat Jun 29 15:16:59 2024 UTC
gpg:                using RSA key [27](https://github.com/MFlowCode/MFC/actions/runs/9763795526/job/26950550860?pr=500#step:6:28)034E7FDB850E0BBC2C62FF806BB28AED779869
gpg: Good signature from "Codecov Uploader (Codecov Uploader Verification Key) <[email protected]>" [unknown]
gpg: WARNING: This key is not certified with a trusted signature!
gpg:          There is no indication that the signature belongs to the owner.
Primary key fingerprint: 2703 4E7F DB85 0E0B BC2C  62FF 806B B[28](https://github.com/MFlowCode/MFC/actions/runs/9763795526/job/26950550860?pr=500#step:6:29)A ED77 9869

==> Running version v0.7.2
==> Running command '/home/runner/work/_actions/codecov/codecov-action/v4.0.1/dist/codecov -v create-commit'
/home/runner/work/_actions/codecov/codecov-action/v4.0.1/dist/codecov -v create-commit -C 1eea16dae14c9c6a946520b23a16fc6a005bd7d4 -Z
==> Uploader SHASUM verified (8777a6078323948d31cbd81b7776254d1fbfd6888c33dc899b1447b208d717f6  codecov)
info - 2024-07-02 16:35:[29](https://github.com/MFlowCode/MFC/actions/runs/9763795526/job/26950550860?pr=500#step:6:30),231 -- ci service found: github-actions
debug - 2024-07-02 16:35:29,234 -- versioning system found: <class 'codecov_cli.helpers.versioning_systems.GitVersioningSystem'>
debug - 2024-07-02 16:35:29,236 -- versioning system found: <class 'codecov_cli.helpers.versioning_systems.GitVersioningSystem'>
warning - 2024-07-02 16:[35](https://github.com/MFlowCode/MFC/actions/runs/9763795526/job/26950550860?pr=500#step:6:36):29,239 -- No config file could be found. Ignoring config.
debug - 2024-07-02 16:35:29,239 -- No codecov_yaml found
debug - 2024-07-02 16:35:29,244 -- Starting create commit process --- {"commit_sha": "1eea16dae14c9c6a946520b23a16fc6a005bd7d4", "parent_sha": null, "pr": "500", "branch": "coverage-ci", "slug": "MFlowCode/MFC", "token": null, "service": "github", "enterprise_url": null}
Error: Codecov token not found. Please provide Codecov token with -t flag.
Error: Codecov: Failed to properly create commit: The process '/home/runner/work/_actions/codecov/codecov-action/v4.0.1/dist/codecov' failed with exit code 1

@okBrian
Copy link
Contributor

okBrian commented Jul 2, 2024

Based on CodeCov's README shouldn't it be this

        env:
          CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

Instead of

        env:
          token: ${{ secrets.CODECOV_TOKEN }}

This is based on the readme file of codecov actions here:

steps:
- uses: actions/checkout@main
- uses: codecov/codecov-action@v4
  with:
    fail_ci_if_error: true # optional (default = false)
    files: ./coverage1.xml,./coverage2.xml # optional
    flags: unittests # optional
    name: codecov-umbrella # optional
    verbose: true # optional (default = false)
  env:
    CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

@sbryngelson
Copy link
Member Author

giving this a go

@okBrian
Copy link
Contributor

okBrian commented Jul 2, 2024

It seems to be known issue with tokenless upload but it does appear to affect token uploads too - codecov/codecov-action#1487 (comment)

Heres a working example with v0.7.1 (we are using v0.7.2) from the post above - https://github.com/stylelint/stylelint/actions/runs/9688239908/job/26734397467?pr=7804#step:7:54

v0.6.0 also seems to work from the same person - stylelint/stylelint@f2f9a6a

To change the version just add version: v0.6.0 or version: v0.7.1 under with:

Copy link

codecov bot commented Jul 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 58.36%. Comparing base (9f6b81f) to head (2d42787).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #500   +/-   ##
=======================================
  Coverage   58.36%   58.36%           
=======================================
  Files          57       57           
  Lines       14442    14442           
  Branches     1892     1892           
=======================================
  Hits         8429     8429           
  Misses       5451     5451           
  Partials      562      562           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sbryngelson sbryngelson merged commit b9b8bc4 into MFlowCode:master Jul 2, 2024
21 checks passed
@sbryngelson sbryngelson deleted the coverage-ci branch July 2, 2024 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
continuous-integration Continuous integration (CI)
Development

Successfully merging this pull request may close these issues.

None yet

2 participants