Skip to content

Add codecoverage, CodeQL analysis, dotnet-format #89

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

Merged
merged 18 commits into from
Feb 1, 2021
Merged

Conversation

sungam3r
Copy link
Member

No description provided.

@github-actions github-actions bot added CI CI configuration issue or pull request documentation An issue or pull request regarding documentation improvements test Pull request that adds new or changes existing tests labels Oct 27, 2020
@sungam3r sungam3r changed the title add codecoverage [WIP] add codecoverage Oct 29, 2020
@sungam3r
Copy link
Member Author

sungam3r commented Oct 31, 2020

It works! https://coveralls.io/builds/34609689

изображение

@sungam3r sungam3r changed the title [WIP] add codecoverage Add codecoverage Oct 31, 2020
@sungam3r
Copy link
Member Author

sungam3r commented Oct 31, 2020

@joemcbride @Shane32 PR is finally ready for review. I added new actions in test job for calculating code coverage.

Modified steps:

  1. dotnet test began to produce lcov.info coverage file

New steps:

  1. Convert coverage report to clover format ('Monitor coverage' works only with this format)
  2. Monitor coverage adds coverage comment in PR (replace mode, only one comment)
  3. Upload coverage to Coveralls, see https://coveralls.io/github/graphql-dotnet/parser
  4. Upload coverage to Codecov. Now not working and disabled. I wanted to see what it looks like, but I haven’t succeeded yet. It seemed to me that coveralls has a not very intuitive UI.

Questions:

  1. Do I need to move all new actions to run only on Linux?
  2. Is it possible and necessary to do this in a separate job, so as not to resort to if: condition for steps?
  3. What to do with master branch? It would be nice to do a test coverage on master too.
  4. Should I try to get Codecov work (may need help)?

After we get everything in order here, I would like to add the same steps to other repositories.

Copy link
Member

@Shane32 Shane32 left a comment

Choose a reason for hiding this comment

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

Very nice!

@Shane32
Copy link
Member

Shane32 commented Nov 2, 2020

Do you think we should add "html" and "htmlsummary" outputs to the build artifacts for the test?

See: https://github.com/Shane32/ExcelLinq/pull/3/files for necessary changes

Sample output: download artifacts from here:
https://github.com/Shane32/ExcelLinq/actions/runs/340792028

I'm going to do this for my private repos instead of paying for coveralls pro.

@sungam3r
Copy link
Member Author

sungam3r commented Nov 2, 2020

I was expecting this question. I also use ReportGenerator on my projects at work. We use TeamCity and there it is possible to display artifacts on a separate project tab, just point to some 'root' file to render (index.html). It's convenient, you don't need to download anything and the report is always in front of your eyes. The report really helps to understand what the code is not covered by the tests. In the case of GitHub Action, I'm not sure that someone will download this report as artifact. At least I won't, it's not convenient for me and I'm just lazy. For me it is much more convenient to configure systems such as coveralls or codecov to do all the work of displaying and maintaining coverage statistics. Of course, the question is how convenient these systems are and their cost. I have no experience with them.

I'm going to do this for my private repos instead of paying for coveralls pro.

What gives pro compared to what is given for free?

As a conclusion. I was going to read general information about different code coverage web systems to compare them and evaluate their pros and cons.

@Shane32
Copy link
Member

Shane32 commented Nov 2, 2020

Coveralls free isn’t free for private repos. If you’ve got a better solution for private repos, I’m all ears.

@sungam3r
Copy link
Member Author

sungam3r commented Nov 2, 2020

I don't khow, my primary goal are public repos like GraphQL.NET, Parser. etc.

@sungam3r sungam3r changed the title Add codecoverage Add codecoverage, CodeQL analysis, dotnet-format Jan 4, 2021
@sungam3r sungam3r mentioned this pull request Jan 16, 2021
@sungam3r sungam3r changed the base branch from master to develop February 1, 2021 10:18
@github-actions github-actions bot added the code style Pull request that applies code style rules label Feb 1, 2021
@github-actions
Copy link

github-actions bot commented Feb 1, 2021

Coverage Report

Totals Coverage
Statements: 90.42% ( 1822 / 2015 )
Methods: 73.95% ( 318 / 430 )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI CI configuration issue or pull request code style Pull request that applies code style rules documentation An issue or pull request regarding documentation improvements test Pull request that adds new or changes existing tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants