File tree Expand file tree Collapse file tree 1 file changed +21
-10
lines changed
Expand file tree Collapse file tree 1 file changed +21
-10
lines changed Original file line number Diff line number Diff line change 1- # This workflow will build a .NET project
1+ # This workflow will build and test a .NET project
22# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
33
4- name : .NET
4+ name : .NET
55
66on :
7- push :
7+ push :
88 branches : [ "main" ]
9- pull_request :
9+ pull_request :
1010 branches : [ "main" ]
1111
1212jobs :
13- build :
14-
13+ build-and-test :
1514 runs-on : ubuntu-latest
1615
1716 steps :
18- - uses : actions/checkout@v4
17+ - name : Checkout code
18+ uses : actions/checkout@v4
19+
1920 - name : Setup .NET
2021 uses : actions/setup-dotnet@v4
2122 with :
2223 dotnet-version : 8.0.x
24+
2325 - name : Restore dependencies
2426 run : dotnet restore
25- - name : Build
27+
28+ - name : Build project
2629 run : dotnet build --no-restore
27- - name : Test
28- run : dotnet test --no-build --verbosity normal
30+
31+ - name : Run tests
32+ run : dotnet test --no-build --verbosity normal --logger:"trx;LogFileName=test_results.trx"
33+
34+ - name : Upload Test Results
35+ if : always()
36+ uses : actions/upload-artifact@v4
37+ with :
38+ name : test-results
39+ path : ' **/TestResults/*.trx'
You can’t perform that action at this time.
0 commit comments