add: test action

This commit is contained in:
jackfiled 2024-07-27 15:41:11 +08:00
parent 02c5690d97
commit 61959dff66
2 changed files with 29 additions and 0 deletions

View File

@ -0,0 +1,19 @@
name: Run unit test
on: [ push ]
jons:
Unit-Test:
runs-on: archlinux
steps:
- name: Check out repository code
uses: https://git.rrricardo.top/actions/checkout@v4
- name: Cache nuget packages
uses: https://git.rrricardo.top/actions/cache@v4
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget
save-always: true
- name: Build code
run: dotnet build
- name: Run test code
run: dotnet test

View File

@ -9,6 +9,13 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CanonSharp.Tests", "CanonSh
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CanonSharp.Common", "CanonSharp.Common\CanonSharp.Common.csproj", "{288943FE-E3E6-49E2-8C6F-9B5B9242266C}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CanonSharp.Common", "CanonSharp.Common\CanonSharp.Common.csproj", "{288943FE-E3E6-49E2-8C6F-9B5B9242266C}"
EndProject EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".gitea", ".gitea", "{B97A35A0-4616-4B3F-8F73-A66827BC98BA}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{E29A838A-6D2A-4EC6-B2E5-7D53DB491A3F}"
ProjectSection(SolutionItems) = preProject
.gitea\workflows\unit-test.yaml = .gitea\workflows\unit-test.yaml
EndProjectSection
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
@ -31,4 +38,7 @@ Global
{288943FE-E3E6-49E2-8C6F-9B5B9242266C}.Release|Any CPU.ActiveCfg = Release|Any CPU {288943FE-E3E6-49E2-8C6F-9B5B9242266C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{288943FE-E3E6-49E2-8C6F-9B5B9242266C}.Release|Any CPU.Build.0 = Release|Any CPU {288943FE-E3E6-49E2-8C6F-9B5B9242266C}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{E29A838A-6D2A-4EC6-B2E5-7D53DB491A3F} = {B97A35A0-4616-4B3F-8F73-A66827BC98BA}
EndGlobalSection
EndGlobal EndGlobal