Skip to content

Commit

Permalink
Run unitest on ci (#6)
Browse files Browse the repository at this point in the history
* test unitest on ci

---------

Co-authored-by: Julien Creach <julien.creach@apside.com>
  • Loading branch information
jcreach and Julien Creach authored Sep 2, 2024
1 parent cfcc5b6 commit 9bbb3e9
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 1 deletion.
24 changes: 24 additions & 0 deletions .github/workflows/unitTest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Kata validation
on:
pull_request:

jobs:
unit-tests:
runs-on: ubuntu-latest
permissions: write-all
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Add dotnet tools
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.x
- name: Run test(s)
run: dotnet test ./katas/katas.sample.test
- name: Publish test result
uses: dorny/test-reporter@v1
if: success() || failure() # run this step even if previous step failed
with:
name: Kata result # Name of the check run which will be created
reporter: dotnet-trx
path: '**/*.trx' # Path to test results
2 changes: 1 addition & 1 deletion katas/katas.sln → katas/Katas.sln
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ VisualStudioVersion = 17.10.34916.146
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Katas.Sample", "Katas.Sample\Katas.Sample.csproj", "{570C6B8A-0885-4C62-A81A-484C1794DD09}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Katas.Sample.test", "Katas.Sample.test\Katas.Sample.test.csproj", "{8535ACAD-1CC3-48A1-8029-8F84A59CC1DD}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Katas.Sample.Test", "Katas.Sample.Test\Katas.Sample.Test.csproj", "{8535ACAD-1CC3-48A1-8029-8F84A59CC1DD}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
2 changes: 2 additions & 0 deletions katas/katas.sample.test/katas.sample.test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
<VSTestLogger>trx%3bLogFileName=$(MSBuildProjectName).trx</VSTestLogger>
<VSTestResultsDirectory>$(MSBuildThisFileDirectory)TestResults/</VSTestResultsDirectory>
</PropertyGroup>

<ItemGroup>
Expand Down

0 comments on commit 9bbb3e9

Please sign in to comment.