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

[CI] Enumerate test projects at build time for PR validation #7842

Draft
wants to merge 20 commits into
base: main
Choose a base branch
from

Conversation

radical
Copy link
Member

@radical radical commented Mar 1, 2025

No description provided.

@@ -0,0 +1,43 @@
<Project DefaultTargets="GenerateTestProjectsJsonForGithubActions">
Copy link
Member

Choose a reason for hiding this comment

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

I think I would much rather have this expressed in yaml and than in msbuild.

Copy link
Member Author

Choose a reason for hiding this comment

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

Having it in msbuild allows us to control at the .csproj level whether to skip the tests, though that might not be a common scenario.

I was trying to do all this in yaml, but generating the json for the matrix was a pain. But I do have the code simplified now, so that json is simpler too, and we can try yaml.

Copy link
Member Author

Choose a reason for hiding this comment

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

Hm keeping it in msbuild though means that we are sharing the same rules for helix, and for gh actions, which would keep that consistent.

Copy link
Member

Choose a reason for hiding this comment

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

I hear you, but, copilot is kinda crap at writing msbuild and it's amazing at writing yaml. When I look at our csproj files wrapping shell commands its quite unmaintainable. This yaml file is long but very clean and really easy to understand. Maybe this is a fine middle ground but it feels really messy to me.

Copy link
Member Author

Choose a reason for hiding this comment

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

By "shell commands" do you mean the json being emitted to the file? I should be able to get that out of this project, then it would just be evaluating all the msbuild projects to find the ones that should be built.

The alternative would be to pick up the test projects with globbing, and keeping an exclude list in the yaml.

Copy link
Member

Choose a reason for hiding this comment

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

My bias is David's, an exclude list in the yaml sounds good. I like simple. (If we don't care about Helix)

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