File tree Expand file tree Collapse file tree 1 file changed +42
-0
lines changed
Expand file tree Collapse file tree 1 file changed +42
-0
lines changed Original file line number Diff line number Diff line change 1+ name : .NET CI
2+
3+ on :
4+ push :
5+ branches : [ main ]
6+ workflow_dispatch :
7+
8+ jobs :
9+ build-and-test :
10+ runs-on : ubuntu-latest
11+
12+ steps :
13+ - name : Checkout
14+ uses : actions/checkout@v4
15+
16+ - name : Setup .NET
17+ uses : actions/setup-dotnet@v4
18+ with :
19+ dotnet-version : ' 10.0.x'
20+
21+ - name : Cache NuGet packages
22+ uses : actions/cache@v4
23+ with :
24+ path : ~/.nuget/packages
25+ key : ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }}
26+ restore-keys : |
27+ ${{ runner.os }}-nuget-
28+
29+ - name : Restore
30+ run : dotnet restore
31+
32+ - name : Build
33+ run : dotnet build --configuration Release --no-restore
34+
35+ - name : Test
36+ run : dotnet test --configuration Release --no-build --logger "trx;LogFileName=test_results.trx"
37+
38+ - name : Upload test results
39+ uses : actions/upload-artifact@v4
40+ with :
41+ name : test-results
42+ path : ' **/TestResults/*.trx'
You can’t perform that action at this time.
0 commit comments