-
Notifications
You must be signed in to change notification settings - Fork 521
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
Trying out gha to run tests #7073
base: main
Are you sure you want to change the base?
Conversation
// Need to grant read access to the config file on unix like systems. | ||
if (!OperatingSystem.IsWindows()) | ||
{ | ||
// 777 | ||
var permissions = UnixFileMode.UserRead | UnixFileMode.UserWrite | UnixFileMode.UserExecute | | ||
UnixFileMode.GroupRead | UnixFileMode.GroupWrite | UnixFileMode.GroupExecute | | ||
UnixFileMode.OtherRead | UnixFileMode.OtherWrite | UnixFileMode.OtherExecute; | ||
|
||
File.SetUnixFileMode(serverFileMount.Source!, permissions); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be done as part of the call to CreateDirectory above:
public static class Directory
{
[UnsupportedOSPlatform("windows")]
public static DirectoryInfo! CreateDirectory(string! path, UnixFileMode unixCreateMode);
}
@@ -304,6 +306,17 @@ public static IResourceBuilder<PostgresServerResource> WithPgWeb(this IResourceB | |||
Directory.CreateDirectory(serverFileMount.Source!); | |||
} | |||
|
|||
// Need to grant read access to the config file on unix like systems. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why wasn't this needed before?
filter: "WithDataShouldPersistStateBetweenUsages" | ||
- project: tests/Aspire.Hosting.PostgreSQL.Tests/Aspire.Hosting.PostgreSQL.Tests.csproj | ||
name: PostgreSQL | ||
filter: "Aspire.Hosting" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these filters just for now? I wouldn't expect us to use them when we did this for real.
@@ -61,7 +61,7 @@ public static TestDistributedApplicationBuilder Create(Action<DistributedApplica | |||
return new TestDistributedApplicationBuilder(configureOptions, testOutputHelper); | |||
} | |||
|
|||
public static TestDistributedApplicationBuilder CreateWithTestContainerRegistry(ITestOutputHelper testOutputHelper) => | |||
public static TestDistributedApplicationBuilder CreateWithTestContainerRegistry(ITestOutputHelper? testOutputHelper = null) => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be reverted. We always want an ITestOutputHelper to be passed so we get log output correctly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was debugging 😄
if (!OperatingSystem.IsWindows()) | ||
{ | ||
var permissions = UnixFileMode.UserRead | UnixFileMode.UserWrite | UnixFileMode.UserExecute | | ||
UnixFileMode.GroupRead | UnixFileMode.GroupWrite | UnixFileMode.GroupExecute | | ||
UnixFileMode.OtherRead | UnixFileMode.OtherWrite | UnixFileMode.OtherExecute; | ||
|
||
File.SetUnixFileMode(bindMountPath, permissions); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We shouldn't be doing this in the test - this seems like a product bug.
timeout-minutes: 60 | ||
strategy: | ||
fail-fast: false | ||
matrix: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this mean that for each test assembly we will get a separate job/leg in CI?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct
Trying this out