Skip to content

Commit

Permalink
Add test step to build script
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaioru committed Dec 11, 2024
1 parent b34d794 commit 1d9a709
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 23 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@ jobs:
.nuke/temp
~/.nuget/packages
key: ${{ runner.os }}-${{ hashFiles('**/global.json', '**/*.csproj', '**/Directory.Packages.props') }}
- name: 'Run: Compile'
run: ./build.cmd Compile
- name: 'Run: Compile, Test'
run: ./build.cmd Compile Test
16 changes: 1 addition & 15 deletions build/Build.CI.GithubActions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,6 @@
"build",
GitHubActionsImage.WindowsLatest,
On = new[] { GitHubActionsTrigger.Push },
InvokedTargets = new[] { nameof(Compile) }
)]
[GitHubActions(
"pack",
GitHubActionsImage.WindowsLatest,
On = new[] { GitHubActionsTrigger.WorkflowDispatch },
InvokedTargets = new[] { nameof(Pack) },
FetchDepth = 0
)]
[GitHubActions(
"publish",
GitHubActionsImage.WindowsLatest,
On = new[] { GitHubActionsTrigger.WorkflowDispatch },
InvokedTargets = new[] { nameof(Publish) },
FetchDepth = 0
InvokedTargets = new[] { nameof(Compile), nameof(Test) }
)]
partial class Build;
7 changes: 4 additions & 3 deletions build/Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,13 @@ partial class Build : NukeBuild
Target Restore => d => d
.Executes(() => DotNetTasks.DotNetRestore());

Target Test => d => d
.Executes(() => DotNetTasks.DotNetTest());

Target Compile => d => d
.DependsOn(Restore)
.Executes(() => DotNetTasks
.DotNetBuild(s => s
.SetConfiguration(Configuration)));

Target Test => d => d
.After(Compile)
.Executes(() => DotNetTasks.DotNetTest());
}
5 changes: 5 additions & 0 deletions build/_build.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,9 @@
<Folder Include="ci\" />
</ItemGroup>

<ItemGroup>
<None Remove="..\.github\workflows\pack.yml" />
<None Remove="..\.github\workflows\publish.yml" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="EntityFrameworkCore.Exceptions.Sqlite" Version="8.1.3" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="9.0.0-preview.7.24405.3" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="9.0.0" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="EntityFrameworkCore.Exceptions.Sqlite" Version="8.1.3" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="9.0.0-rc.1.24451.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="9.0.0-preview.7.24405.3" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="9.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="9.0.0" />
</ItemGroup>
</Project>

0 comments on commit 1d9a709

Please sign in to comment.