Skip to content

Update build to use GitHub Actions #1455

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 54 commits into from
May 6, 2025
Merged

Update build to use GitHub Actions #1455

merged 54 commits into from
May 6, 2025

Conversation

tillig
Copy link
Member

@tillig tillig commented Apr 23, 2025

This switches the overall build and release process to be more modernized and use GitHub Actions and MSBuild.

Run the build with dotnet msbuild ./default.proj.

The original Powershell build was written before the dotnet command existed, when it was still dnx. The notion of dotnet test didn't quite work as expected, the MSBuild support wasn't really cross-platform... it was a long time ago. A lot has evolved since then and it's time to update.

  • Removed the Powershell and AppVeyor build connections.
  • Add GitHub Actions workflows for CI and publishing.
    • Pre-releases (pushes to develop) and releases (tags on master with vX.Y.Z format) will be published to GitHub Packages.
    • Releases (just tags on master with vX.Y.Z format) will be published to NuGet.
  • Added pre-commit linting to the build, which should also work for any developer wanting to contribute. Lots of whitespace changes due to this with trailing whitespace.
  • Added dotnet format checking to the build. It isn't part of pre-commit because it seems to want to restore the whole solution just to check one file. We can converge that later if someone figures out how. There are a couple of minor formatting fixes included due to this.
  • The build will install whatever the latest SDK versions are so we don't have to track it in global.json.
  • Updated the way coverage is gathered to work around a known issue in the coverlet.msbuild package where sometimes the coverage process gets killed mid-gathering.

I'll need to update the central CONTRIBUTING.md to explain the changes here.

I have not been able to actually test the publishing to GitHub Packages or NuGet. It could be that we need to adjust things on the fly the first time we run it. Likely we should do that before converting other repos to this structure.

tillig added 30 commits April 18, 2025 11:08
@tillig tillig requested a review from alistairjevans April 23, 2025 14:57
Copy link

codecov bot commented Apr 23, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.93%. Comparing base (cf88148) to head (b278ef7).
Report is 55 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1455      +/-   ##
===========================================
- Coverage    78.94%   77.93%   -1.01%     
===========================================
  Files          200      211      +11     
  Lines         5681     5403     -278     
  Branches      1145     1148       +3     
===========================================
- Hits          4485     4211     -274     
+ Misses         699      693       -6     
- Partials       497      499       +2     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@tillig
Copy link
Member Author

tillig commented Apr 24, 2025

Just realized I probably need to make the "package/push" dependent on all the steps completing including lint. Let me fix that up.

@tillig
Copy link
Member Author

tillig commented Apr 24, 2025

Fixed that. I think there's a potential that the download-artifact task may have the wrong path based on where things will unzip, but we can figure that out on the fly.

alistairjevans
alistairjevans previously approved these changes May 4, 2025
Copy link
Member

@alistairjevans alistairjevans left a comment

Choose a reason for hiding this comment

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

Nice! Just one thought.

@tillig
Copy link
Member Author

tillig commented May 6, 2025

I'm not sure why the coverage is lower, but it's likely a difference in reporting and due to some of the minor rename/refactor items here.

I'm going to go ahead and merge this in since I want to get past the build challenges and start getting other PRs building using the new system.

@tillig tillig merged commit 7b8981f into develop May 6, 2025
9 of 10 checks passed
@tillig tillig deleted the feature/github-actions branch May 6, 2025 21:38
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.

2 participants