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

Added github action to run a subset of tests #7328

Merged
merged 30 commits into from
Feb 1, 2025
Merged

Conversation

davidfowl
Copy link
Member

@davidfowl davidfowl commented Jan 30, 2025

Moving out CI tests to github actions (initial experiment #7073)

@joperezr joperezr requested a review from Copilot January 30, 2025 20:36

Choose a reason for hiding this comment

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

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (1)

src/Aspire.Hosting.PostgreSQL/PostgresBuilderExtensions.cs:311

  • [nitpick] The variable name 'mode' is ambiguous. It should be renamed to 'filePermissions'.
var mode = UnixFileMode.UserRead | UnixFileMode.UserWrite | UserExecute |
@joperezr joperezr requested a review from mitchdenny as a code owner January 31, 2025 00:28
@@ -56,7 +56,7 @@ await WaitForAllTextAsync(app,
await app.StopAsync();
}

[Fact]
[Fact(Skip = "The project reference for this test is skipped in CI.")]
Copy link
Member

Choose a reason for hiding this comment

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

@captainsafia looks like this test hasn't been running on CI as the P2P has been conditioned out when -ci flag is passed to the build, is that intentional?

https://github.com/dotnet/aspire/blob/1edf95d2f236fccff2d7b9c9cb54d7da88eb7b2e/tests/Aspire.Playground.Tests/Aspire.Playground.Tests.csproj#L51C54-L51C76

This change is just making it so that it is explicitly skipped so GHA doesn't try to run it but please let me know if that's wrong.

Copy link
Member

@captainsafia captainsafia Feb 1, 2025

Choose a reason for hiding this comment

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

@captainsafia looks like this test hasn't been running on CI as the P2P has been conditioned out when -ci flag is passed to the build, is that intentional?

💀 No...I'm a little surprised at this. Is that -ci flag actually set? Here are the test analytics for this test over the last 30 days off the main branch:

image

Copy link
Member

Choose a reason for hiding this comment

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

That is for the whole workitem (meaning the whole test assembly as opposed to the single test) though, right?

Copy link
Member

Choose a reason for hiding this comment

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

ci flag is set in our pipeline builds so that P2P wouldn't be included, meaning this test would fail like it did in this PR, so I'm guessing it is getting skipped by some different means.

Copy link
Member

Choose a reason for hiding this comment

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

That is for the whole workitem (meaning the whole test assembly as opposed to the single test) though, right?

I accidentally cropped it from the image but its for the AzureFunctionsTest in particular:

image

I think we should remove the constraint in the project file since this test should be running.

Copy link
Member

Choose a reason for hiding this comment

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

I did try that and it wasn't working for some reason. Anyway, for the sake of incremental progress I'll go ahead and not run playground tests in GHA for now and we can add that back in a follow up. That will enable the rest of the tests to start running in GHA.

Copy link
Member

Choose a reason for hiding this comment

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

I'd be curious for what is happening in helix, I do have a hunch that the test is not running since I'm sure we pass -ci to our tests, so perhaps the Requires func attribute is making the test still shown as run but actually skipped dynamically? I can take a closer look

Copy link
Member

Choose a reason for hiding this comment

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

Interesting, looks like playground tests actually don't build on the build machine and instead get built directly on Helix, and in there it seems like they don't pass -ci, so the test might indeed be running after all

@joperezr
Copy link
Member

joperezr commented Jan 31, 2025

I think this should be good to go now, and I'm planning on merging this later today. There are some pending items that I want to address in a follow-up:

  • Remove duplication of skipping tests explicitly and instead just get ActiveIssue attribute to work in GHA
  • Add GitHubActions logger to dotnet test for better integration with actions.
  • Add more test projects to the list of things we run in GHA
  • Re-enable Playground tests in GHA

FYI: @davidfowl

@joperezr joperezr enabled auto-merge (squash) February 1, 2025 01:08
@joperezr joperezr disabled auto-merge February 1, 2025 02:43
@joperezr joperezr enabled auto-merge (squash) February 1, 2025 04:01
@joperezr joperezr merged commit d910655 into main Feb 1, 2025
16 checks passed
@joperezr joperezr deleted the davidfowl/gha-experiment2 branch February 1, 2025 04:59
@joperezr joperezr mentioned this pull request Feb 1, 2025
18 tasks
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.

4 participants