Skip to content

Commit 79af14f

Browse files
committed
#13 テストとCIを追加
1 parent 92f28a4 commit 79af14f

File tree

8 files changed

+98
-5
lines changed

8 files changed

+98
-5
lines changed

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ insert_final_newline = true
1212
trim_trailing_whitespace = true
1313

1414
# XML project files
15-
[*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,projitems,shproj}]
15+
[*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,projitems,shproj,yaml}]
1616
indent_size = 2
1717

1818
# XML config files

.github/workflows/ci.yaml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
build:
14+
runs-on: windows-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
- uses: actions/setup-dotnet@v3
18+
with:
19+
dotnet-version: 8.0.x
20+
- uses: microsoft/[email protected]
21+
22+
- run: dotnet restore
23+
- run: dotnet format whitespace --verify-no-changes
24+
- run: dotnet build -c Release
25+
26+
test:
27+
runs-on: windows-latest
28+
steps:
29+
- uses: actions/checkout@v4
30+
- uses: actions/setup-dotnet@v3
31+
with:
32+
dotnet-version: 8.0.x
33+
- uses: microsoft/[email protected]
34+
35+
- run: dotnet restore
36+
- run: dotnet test

Epub/KoeBook.Epub/Epub.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
namespace KoeBook.Epub;
1+
namespace KoeBook.Epub;
22

33
public class Epub
44
{

KoeBook.Common/ScriptLine.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using CommunityToolkit.Mvvm.ComponentModel;
1+
using CommunityToolkit.Mvvm.ComponentModel;
22

33
namespace KoeBook.Common;
44
internal partial class ScriptLine : ObservableObject

KoeBook.Test/KoeBook.Test.csproj

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<TargetFramework>net8.0</TargetFramework>
5+
<ImplicitUsings>enable</ImplicitUsings>
6+
<Nullable>enable</Nullable>
7+
8+
<IsPackable>false</IsPackable>
9+
<IsTestProject>true</IsTestProject>
10+
</PropertyGroup>
11+
12+
<ItemGroup>
13+
<PackageReference Include="coverlet.collector" Version="6.0.0" />
14+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
15+
<PackageReference Include="xunit" Version="2.5.3" />
16+
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.3" />
17+
</ItemGroup>
18+
19+
<ItemGroup>
20+
<ProjectReference Include="..\Epub\KoeBook.Epub\KoeBook.Epub.csproj" />
21+
<ProjectReference Include="..\KoeBook.Common\KoeBook.Common.csproj" />
22+
<ProjectReference Include="..\KoeBook.Core\KoeBook.Core.csproj" />
23+
</ItemGroup>
24+
25+
<ItemGroup>
26+
<Using Include="Xunit" />
27+
</ItemGroup>
28+
29+
</Project>

KoeBook.Test/UnitTest1.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
namespace KoeBook.Test;
2+
3+
public class UnitTest1
4+
{
5+
[Fact]
6+
public void Test1()
7+
{
8+
9+
}
10+
}

KoeBook.sln

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,12 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "KoeBook", "KoeBook\KoeBook.
77
EndProject
88
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "KoeBook.Core", "KoeBook.Core\KoeBook.Core.csproj", "{50444E76-C6A7-40AF-879C-0AD88A287510}"
99
EndProject
10-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "KoeBook.Common", "KoeBook.Common\KoeBook.Common.csproj", "{1E5B40AE-1D42-40D0-85D1-E921B17BFA69}"
10+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "KoeBook.Common", "KoeBook.Common\KoeBook.Common.csproj", "{1E5B40AE-1D42-40D0-85D1-E921B17BFA69}"
1111
EndProject
1212
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "KoeBook.Epub", "Epub\KoeBook.Epub\KoeBook.Epub.csproj", "{1DE55F58-E4F3-4077-A241-AFFD736A2B01}"
1313
EndProject
14+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "KoeBook.Test", "KoeBook.Test\KoeBook.Test.csproj", "{67CEB31C-B026-499A-83B4-528914EABDBF}"
15+
EndProject
1416
Global
1517
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1618
Debug|Any CPU = Debug|Any CPU
@@ -95,6 +97,22 @@ Global
9597
{1DE55F58-E4F3-4077-A241-AFFD736A2B01}.Release|x64.Build.0 = Release|Any CPU
9698
{1DE55F58-E4F3-4077-A241-AFFD736A2B01}.Release|x86.ActiveCfg = Release|Any CPU
9799
{1DE55F58-E4F3-4077-A241-AFFD736A2B01}.Release|x86.Build.0 = Release|Any CPU
100+
{67CEB31C-B026-499A-83B4-528914EABDBF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
101+
{67CEB31C-B026-499A-83B4-528914EABDBF}.Debug|Any CPU.Build.0 = Debug|Any CPU
102+
{67CEB31C-B026-499A-83B4-528914EABDBF}.Debug|arm64.ActiveCfg = Debug|Any CPU
103+
{67CEB31C-B026-499A-83B4-528914EABDBF}.Debug|arm64.Build.0 = Debug|Any CPU
104+
{67CEB31C-B026-499A-83B4-528914EABDBF}.Debug|x64.ActiveCfg = Debug|Any CPU
105+
{67CEB31C-B026-499A-83B4-528914EABDBF}.Debug|x64.Build.0 = Debug|Any CPU
106+
{67CEB31C-B026-499A-83B4-528914EABDBF}.Debug|x86.ActiveCfg = Debug|Any CPU
107+
{67CEB31C-B026-499A-83B4-528914EABDBF}.Debug|x86.Build.0 = Debug|Any CPU
108+
{67CEB31C-B026-499A-83B4-528914EABDBF}.Release|Any CPU.ActiveCfg = Release|Any CPU
109+
{67CEB31C-B026-499A-83B4-528914EABDBF}.Release|Any CPU.Build.0 = Release|Any CPU
110+
{67CEB31C-B026-499A-83B4-528914EABDBF}.Release|arm64.ActiveCfg = Release|Any CPU
111+
{67CEB31C-B026-499A-83B4-528914EABDBF}.Release|arm64.Build.0 = Release|Any CPU
112+
{67CEB31C-B026-499A-83B4-528914EABDBF}.Release|x64.ActiveCfg = Release|Any CPU
113+
{67CEB31C-B026-499A-83B4-528914EABDBF}.Release|x64.Build.0 = Release|Any CPU
114+
{67CEB31C-B026-499A-83B4-528914EABDBF}.Release|x86.ActiveCfg = Release|Any CPU
115+
{67CEB31C-B026-499A-83B4-528914EABDBF}.Release|x86.Build.0 = Release|Any CPU
98116
EndGlobalSection
99117
GlobalSection(SolutionProperties) = preSolution
100118
HideSolutionNode = FALSE

KoeBook/Views/ShellPage.xaml.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using KoeBook.Contracts.Services;
1+
using KoeBook.Contracts.Services;
22
using KoeBook.Helpers;
33
using KoeBook.ViewModels;
44

0 commit comments

Comments
 (0)