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
13 changes: 13 additions & 0 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,19 @@ jobs:
run: ./build.sh test-event-store
shell: bash

# Covers both Roslyn source generator suites. These built in CI all along (they are in the
# solution, so `compile` catches compile breaks) but nothing ever ran them, so a generator
# could emit wrong code without failing the build.
- name: test-source-generators
if: ${{ success() || failure() }}
run: ./build.sh test-source-generators
shell: bash

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

# End-to-end CLI smoke tests, including `codegen preview --language fsharp`: proves the F# flag
# is wired through the CLI and the F# emit path runs without throwing. It does NOT prove the
# output compiles -- `preview` only prints, and GeneratorTarget feeds codegen a raw C# CodeFrame
Expand Down
4 changes: 3 additions & 1 deletion .nuke/build.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,14 @@
"SmokeTestAot",
"SmokeTestCommands",
"Test",
"TestAspire",
"TestCodegen",
"TestCodegenFSharp",
"TestCommandLine",
"TestCore",
"TestEvents",
"TestEventStore"
"TestEventStore",
"TestSourceGenerators"
]
},
"Verbosity": {
Expand Down
36 changes: 35 additions & 1 deletion build/Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ partial class Build : NukeBuild
.EnableNoRestore());
});

Target Test => _ => _.DependsOn(TestCore, TestCodegen, TestCodegenFSharp, TestCommandLine, TestEvents, TestEventStore, SmokeTestAot);
Target Test => _ => _.DependsOn(TestCore, TestCodegen, TestCodegenFSharp, TestCommandLine, TestEvents, TestEventStore, TestSourceGenerators, TestAspire, SmokeTestAot);

Target TestCore => _ => _
.DependsOn(Compile)
Expand Down Expand Up @@ -126,6 +126,40 @@ partial class Build : NukeBuild
.EnableNoRestore());
});

// Both source generator suites. These are in the solution (so `compile` builds them, and they
// break the build if they stop compiling) but were in no test target, meaning 45 tests covering
// the two Roslyn generators built and never ran. Single-framework by project: both test
// projects pin TargetFramework=net9.0 to match the netstandard2.0 generators they host.
Target TestSourceGenerators => _ => _
.DependsOn(Compile)
.Executes(() =>
{
DotNetTest(c => c
.SetProjectFile(Solution.src.JasperFx_SourceGenerator_Tests)
.SetConfiguration(Configuration)
.EnableNoBuild()
.EnableNoRestore());

DotNetTest(c => c
.SetProjectFile(Solution.src.JasperFx_Events_SourceGenerator_Tests)
.SetConfiguration(Configuration)
.EnableNoBuild()
.EnableNoRestore());
});

// Aspire integration surface. net10.0-only, matching JasperFx.Aspire itself (Aspire 13 is
// net10-first). Was likewise in the solution but in no test target.
Target TestAspire => _ => _
.DependsOn(Compile)
.Executes(() =>
{
DotNetTest(c => c
.SetProjectFile(Solution.src.JasperFx_Aspire_Tests)
.SetConfiguration(Configuration)
.EnableNoBuild()
.EnableNoRestore());
});

Target SmokeTestCommands => _ => _.DependsOn(Compile)
.Executes(() =>
{
Expand Down
Loading