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

Add upload_coverage_report.yml #600

Merged
merged 4 commits into from
Nov 11, 2023

Conversation

vil02
Copy link
Member

@vil02 vil02 commented Nov 7, 2023

Pull Request Template

Description

This PR integrates this repository with Codecov (TheAlgorithms exist there already). You can see the result for this PR here.

The created yml file was checked with yamllint with --strict flag.

Type of change

Please delete options that are not relevant.

  • generate and upload code coverage report to Codecov.

Checklist:

  • I ran bellow commands using the latest version of rust nightly.
  • I ran cargo clippy --all -- -D warnings just before my last commit and fixed any issue that was found.
  • I ran cargo fmt just before my last commit.
  • I ran cargo test just before my last commit and all tests passed.
  • I added my algorithm to the corresponding mod.rs file within its own folder, and in any parent folder(s).
  • I added my algorithm to DIRECTORY.md with the correct link.
  • I checked COUNTRIBUTING.md and my code follows its guidelines.

Please make sure that if there is a test that takes too long to run ( > 300ms), you #[ignore] that or
try to optimize your code or make the test easier to run. We have this rule because we have hundreds of
tests to run; If each one of them took 300ms, we would have to wait for a long time.

@codecov-commenter
Copy link

Welcome to Codecov 🎉

Once merged to your default branch, Codecov will compare your coverage reports and display the results in this comment.

Thanks for integrating Codecov - We've got you covered ☂️

@vil02 vil02 marked this pull request as ready for review November 7, 2023 16:38
@vil02 vil02 force-pushed the add_upload_coverage_report branch 2 times, most recently from 543d109 to 6030759 Compare November 8, 2023 10:55
@vil02
Copy link
Member Author

vil02 commented Nov 8, 2023

@siriak could you add the CODECOV_TOKEN from here as a secret, in such a way, that it would be used in upload_coverage_report.yml as

token: ${{ secrets.CODECOV_TOKEN }}

The upload to codecov without the token is very unstable (and it will be deprecated in v4).

@vil02 vil02 force-pushed the add_upload_coverage_report branch 5 times, most recently from f99ea4d to 6030759 Compare November 8, 2023 16:51
@siriak
Copy link
Member

siriak commented Nov 11, 2023

The secret will not be passed to workflows triggered from forks (which 99% of PRs are from).
I've been using it here for a long time and saw no problems with it uploading without a token.

@vil02
Copy link
Member Author

vil02 commented Nov 11, 2023

The secret will not be passed to workflows triggered from forks (which 99% of PRs are from).

I haven't thought about that.

I've been using it here for a long time and saw no problems with it uploading without a token.

On some days codecov really has some issues (just have a look at all of these failed runs).

In any case: should I do something additional regarding this PR?

Copy link
Member

@siriak siriak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's give it a try without authentication first. If we see any issues or v3 is deprecated, we'll explore using authentication. I'd like to add it even today, but see no way to make it work at the moment.

@siriak siriak merged commit 4585a79 into TheAlgorithms:master Nov 11, 2023
5 checks passed
@vil02 vil02 deleted the add_upload_coverage_report branch November 11, 2023 21:25
@vil02 vil02 mentioned this pull request Nov 11, 2023
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 this pull request may close these issues.

3 participants