Skip to content

Commit e412c14

Browse files
Merge branch 'master' into copilot/fix-6
2 parents 86c9ff7 + 2036e2f commit e412c14

File tree

6 files changed

+64
-10
lines changed

6 files changed

+64
-10
lines changed

.github/workflows/ci.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# ------------------------------------------------------------------------------
2+
# <auto-generated>
3+
#
4+
# This code was generated.
5+
#
6+
# - To turn off auto-generation set:
7+
#
8+
# [GitHubActions (AutoGenerate = false)]
9+
#
10+
# - To trigger manual generation invoke:
11+
#
12+
# nuke --generate-configuration GitHubActions_ci --host GitHubActions
13+
#
14+
# </auto-generated>
15+
# ------------------------------------------------------------------------------
16+
17+
name: ci
18+
19+
on: [pull_request, push]
20+
21+
jobs:
22+
ubuntu-latest:
23+
name: ubuntu-latest
24+
runs-on: ubuntu-latest
25+
steps:
26+
- uses: actions/checkout@v4
27+
with:
28+
fetch-depth: 10000
29+
- name: 'Cache: .nuke/temp, ~/.nuget/packages'
30+
uses: actions/cache@v4
31+
with:
32+
path: |
33+
.nuke/temp
34+
~/.nuget/packages
35+
key: ${{ runner.os }}-${{ hashFiles('**/global.json', '**/*.csproj', '**/Directory.Packages.props') }}
36+
- name: 'Run: Test'
37+
run: ./build.cmd Test

.nuke/build.schema.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@
3030
"DeployDemo",
3131
"Pack",
3232
"Push",
33-
"Restore"
33+
"Restore",
34+
"Test"
3435
]
3536
},
3637
"Verbosity": {

SimpleBlazorMultiselect.sln

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SimpleBlazorMultiselect", "
88
EndProject
99
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SimpleBlazorMultiselect.Demo", "src\SimpleBlazorMultiselect.Demo\SimpleBlazorMultiselect.Demo.csproj", "{025632E8-CB51-4E49-B47C-B9C75D35A874}"
1010
EndProject
11-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SimpleBlazorMultiselect.Tests", "SimpleBlazorMultiselect.Tests\SimpleBlazorMultiselect.Tests.csproj", "{B4C7E1D8-9F4A-4B2B-8A1C-6D5E7F8A9B0C}"
11+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SimpleBlazorMultiselect.Tests", "src\SimpleBlazorMultiselect.Tests\SimpleBlazorMultiselect.Tests.csproj", "{753C970D-2A63-4ABB-8BE0-A524DF8C2BDB}"
1212
EndProject
1313
Global
1414
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -26,10 +26,10 @@ Global
2626
{025632E8-CB51-4E49-B47C-B9C75D35A874}.Debug|Any CPU.Build.0 = Debug|Any CPU
2727
{025632E8-CB51-4E49-B47C-B9C75D35A874}.Release|Any CPU.ActiveCfg = Release|Any CPU
2828
{025632E8-CB51-4E49-B47C-B9C75D35A874}.Release|Any CPU.Build.0 = Release|Any CPU
29-
{B4C7E1D8-9F4A-4B2B-8A1C-6D5E7F8A9B0C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
30-
{B4C7E1D8-9F4A-4B2B-8A1C-6D5E7F8A9B0C}.Debug|Any CPU.Build.0 = Debug|Any CPU
31-
{B4C7E1D8-9F4A-4B2B-8A1C-6D5E7F8A9B0C}.Release|Any CPU.ActiveCfg = Release|Any CPU
32-
{B4C7E1D8-9F4A-4B2B-8A1C-6D5E7F8A9B0C}.Release|Any CPU.Build.0 = Release|Any CPU
29+
{753C970D-2A63-4ABB-8BE0-A524DF8C2BDB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
30+
{753C970D-2A63-4ABB-8BE0-A524DF8C2BDB}.Debug|Any CPU.Build.0 = Debug|Any CPU
31+
{753C970D-2A63-4ABB-8BE0-A524DF8C2BDB}.Release|Any CPU.ActiveCfg = Release|Any CPU
32+
{753C970D-2A63-4ABB-8BE0-A524DF8C2BDB}.Release|Any CPU.Build.0 = Release|Any CPU
3333
EndGlobalSection
3434
GlobalSection(SolutionProperties) = preSolution
3535
HideSolutionNode = FALSE

build/Build.cs

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@
3131
WritePermissions = [GitHubActionsPermissions.Contents, GitHubActionsPermissions.Pages],
3232
EnableGitHubToken = true
3333
)]
34+
[GitHubActions("ci",
35+
GitHubActionsImage.UbuntuLatest,
36+
On = [GitHubActionsTrigger.PullRequest, GitHubActionsTrigger.Push],
37+
InvokedTargets = [nameof(Test)],
38+
FetchDepth = 10000)]
3439
class Build : NukeBuild
3540
{
3641
[Nuke.Common.Parameter("Configuration to build - Default is 'Debug' (local) or 'Release' (server)")] readonly Configuration Configuration = IsLocalBuild ? Configuration.Debug : Configuration.Release;
@@ -53,6 +58,7 @@ class Build : NukeBuild
5358

5459
Project LibProject => Solution.GetProject("SimpleBlazorMultiselect");
5560
Project DemoProject => Solution.GetProject("SimpleBlazorMultiselect.Demo");
61+
Project TestsProject => Solution.GetProject("SimpleBlazorMultiselect.Tests");
5662

5763
Target Clean => _ => _
5864
.Before(Restore)
@@ -86,7 +92,7 @@ class Build : NukeBuild
8692
.SetProjectFile(Solution)
8793
.SetConfiguration(Configuration)
8894
.CombineWith(
89-
from project in new[] { LibProject, DemoProject }
95+
from project in new[] { LibProject, DemoProject, TestsProject }
9096
from framework in project.GetTargetFrameworks()
9197
select new { project, framework }, (cs, v) => cs
9298
.SetProjectFile(v.project.Path)
@@ -95,6 +101,17 @@ from framework in project.GetTargetFrameworks()
95101
);
96102
});
97103

104+
Target Test => _ => _
105+
.DependsOn(Compile)
106+
.Executes(() =>
107+
{
108+
DotNetTest(s => s
109+
.EnableNoRestore()
110+
.EnableNoBuild()
111+
.SetConfiguration(Configuration)
112+
.SetProjectFile(TestsProject));
113+
});
114+
98115
Target BuildDemo => _ => _
99116
.DependsOn(Restore, Compile)
100117
.Before(DeployDemo)
@@ -197,7 +214,7 @@ from framework in project.GetTargetFrameworks()
197214

198215
// ReSharper disable once UnusedMember.Local
199216
Target Pack => _ => _
200-
.DependsOn(Clean, Compile)
217+
.DependsOn(Clean, Compile, Test)
201218
.Before(Push)
202219
.Requires(() => Configuration == Configuration.Release)
203220
.Executes(() =>

SimpleBlazorMultiselect.Tests/SimpleBlazorMultiselect.Tests.csproj renamed to src/SimpleBlazorMultiselect.Tests/SimpleBlazorMultiselect.Tests.csproj

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
</ItemGroup>
2323

2424
<ItemGroup>
25-
<ProjectReference Include="..\src\SimpleBlazorMultiselect\SimpleBlazorMultiselect.csproj" />
25+
<ProjectReference Include="..\SimpleBlazorMultiselect\SimpleBlazorMultiselect.csproj" />
2626
</ItemGroup>
27-
2827
</Project>

SimpleBlazorMultiselect.Tests/SimpleMultiselectTests.cs renamed to src/SimpleBlazorMultiselect.Tests/SimpleMultiselectTests.cs

File renamed without changes.

0 commit comments

Comments
 (0)