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

Adds test coverage for non generated features #48

Merged
merged 14 commits into from Mar 7, 2024
Merged

Adds test coverage for non generated features #48

merged 14 commits into from Mar 7, 2024

Conversation

nickfloyd
Copy link
Contributor

@nickfloyd nickfloyd commented Mar 5, 2024

Before the change?

  • There was no coverage for the SDK features that were rolled by hand

After the change?

  • There is now test coverage for the feature sets

Pull request checklist

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)

Does this introduce a breaking change?

Please see our docs on breaking changes to help!

  • Yes
  • No

@nickfloyd nickfloyd added the Type: Maintenance Any dependency, housekeeping, and clean up Issue or PR label Mar 5, 2024
@nickfloyd nickfloyd self-assigned this Mar 5, 2024
Copy link

github-actions bot commented Mar 5, 2024

👋 Hi! Thank you for this contribution! Just to let you know, our GitHub SDK team does a round of issue and PR reviews twice a week, every Monday and Friday! We have a process in place for prioritizing and responding to your input. Because you are a part of this community please feel free to comment, add to, or pick up any issues/PRs that are labled with Status: Up for grabs. You & others like you are the reason all of this works! So thank you & happy coding! 🚀

@nickfloyd nickfloyd marked this pull request as ready for review March 6, 2024 20:09
Copy link
Member

@kfcampbell kfcampbell left a comment

Choose a reason for hiding this comment

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

I had a few initial questions!

run: dotnet test --configuration Release --verbosity normal --collect:"XPlat Code Coverage" --results-directory ./coverage -p:ExcludeByFile="**/GitHub/**/*.cs"

- name: Code Coverage Report
uses: irongut/CodeCoverageSummary@v1.3.0
Copy link
Member

Choose a reason for hiding this comment

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

Do you mind explaining why you've gone with this tool? I haven't heard of it before and I'm curious what the alternatives and tradeoffs were.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure... it was the most streamlined, most starred, I would've liked it to be more recently maintained - some other implementations had gists, repos, and accounts tied to it so while I was evaluating different tooling and trying to decide if we even want to do something like this - it seemed to be the most reasonable option.

thresholds: '60 80'

- name: Add Coverage PR Comment
uses: marocchino/sticky-pull-request-comment@v2
Copy link
Member

Choose a reason for hiding this comment

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

I'm also curious about this choice, since many other options exist here, like https://github.com/thollander/actions-comment-pull-request.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As with the above - this was the favored implementation and streamlined option. I'm not sure I am 100% sold on having a PR comment with coverage details - this is really try on the shoe and see if it fits. I am most likely going to pull this out and leave it as reporting in the CI step and leave bubbling up the results for another PR.

Assert.Contains(handlers, h => h is UserAgentHandler);
}

// ChainHandlersCollectionAndGetFirstLink
Copy link
Member

Choose a reason for hiding this comment

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

What's the purpose of this comment and the below one on line 58? Are they going to be expanded upon?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah this needs to be cleaned up - I began grouping tests and this was just a remark to keep things ordered for me.

test/Tests.csproj Show resolved Hide resolved
@nickfloyd
Copy link
Contributor Author

Screenshot 2024-03-07 at 10 36 33 AM

@octokit octokit deleted a comment from github-actions bot Mar 7, 2024
@nickfloyd nickfloyd merged commit 27e7da4 into main Mar 7, 2024
3 checks passed
@nickfloyd nickfloyd deleted the add-tests branch March 7, 2024 18:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Maintenance Any dependency, housekeeping, and clean up Issue or PR
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

2 participants