Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 75 additions & 0 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,81 @@ env:
NUKE_TELEMETRY_OPTOUT: true

jobs:
# The unit test suites again on Windows. Linux CI cannot catch path-separator and other
# platform assumptions, such as AssemblyFinder skipping runtimes/native folders only for '/'
# (jasperfx#1143). This runs the same suites as the Linux `build` job; the CLI and AOT smoke
# tests stay Linux-only.
windows:
runs-on: windows-latest
timeout-minutes: 40

steps:
# The Windows runner's git converts to CRLF on checkout. Keep the committed line endings so
# tests that compare generated code with committed fixtures behave as they do on Linux.
- name: Keep committed line endings
run: git config --global core.autocrlf false

- uses: actions/checkout@v7

- name: Install .NET 9.0.x
uses: actions/setup-dotnet@v6
with:
dotnet-version: 9.0.x

- name: Install .NET 10.0.x
uses: actions/setup-dotnet@v6
with:
dotnet-version: 10.0.x

- name: compile
run: ./build.ps1 compile
shell: pwsh

- name: test-core
if: ${{ success() || failure() }}
run: ./build.ps1 test-core
shell: pwsh

- name: test-codegen
if: ${{ success() || failure() }}
run: ./build.ps1 test-codegen
shell: pwsh

- name: test-codegen-fsharp
if: ${{ success() || failure() }}
run: ./build.ps1 test-codegen-fsharp
shell: pwsh

- name: test-command-line
if: ${{ success() || failure() }}
run: ./build.ps1 test-command-line
shell: pwsh

- name: test-events
if: ${{ success() || failure() }}
run: ./build.ps1 test-events
shell: pwsh

- name: test-event-store
if: ${{ success() || failure() }}
run: ./build.ps1 test-event-store
shell: pwsh

- name: test-source-generators
if: ${{ success() || failure() }}
run: ./build.ps1 test-source-generators
shell: pwsh

- name: test-aspire
if: ${{ success() || failure() }}
run: ./build.ps1 test-aspire
shell: pwsh

- name: test-microsoft-extensions-ai
if: ${{ success() || failure() }}
run: ./build.ps1 test-microsoft-extensions-ai
shell: pwsh

build:
runs-on: ubuntu-latest
timeout-minutes: 20
Expand Down
25 changes: 18 additions & 7 deletions src/CommandLineTests/run_command_compliance.cs
Original file line number Diff line number Diff line change
Expand Up @@ -156,14 +156,25 @@ public void override_the_environment_name()
[Fact]
public void override_the_content_root()
{
var input = new RunInput
// The host builds a PhysicalFileProvider over the content root, so the folder has to exist.
// "/bin" did on Linux and macOS, but resolves to a missing D:\bin\ on Windows.
var contentRoot = Directory.CreateTempSubdirectory("jasperfx-content-root-").FullName;

try
{
ContentRootFlag = "/bin",
HostBuilder = Host.CreateDefaultBuilder()
};

var host = input.BuildHost();
host.Services.GetRequiredService<IHostEnvironment>().ContentRootPath.ShouldBe("/bin");
var input = new RunInput
{
ContentRootFlag = contentRoot,
HostBuilder = Host.CreateDefaultBuilder()
};

using var host = input.BuildHost();
host.Services.GetRequiredService<IHostEnvironment>().ContentRootPath.ShouldBe(contentRoot);
}
finally
{
Directory.Delete(contentRoot, true);
}
}

[Fact]
Expand Down
Loading