File tree Expand file tree Collapse file tree 1 file changed +49
-0
lines changed Expand file tree Collapse file tree 1 file changed +49
-0
lines changed Original file line number Diff line number Diff line change 1+ name : .NET Test
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ pull_request :
8+ branches :
9+ - main
10+
11+ jobs :
12+ build :
13+ runs-on : ubuntu-24.04 # or ubuntu-latest
14+
15+ steps :
16+ - name : Checkout code
17+ uses : actions/checkout@v4
18+
19+ - name : Setup .NET
20+ uses : actions/setup-dotnet@v4
21+ with :
22+ dotnet-version : ' 8.0.x'
23+
24+ - name : Cache NuGet packages
25+ uses : actions/cache@v4
26+ with :
27+ path : ${{ github.workspace }}/.nuget/packages
28+ key : ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }}-${{ hashFiles('**/global.json') }}
29+ restore-keys : |
30+ ${{ runner.os }}-nuget-
31+
32+ - name : Restore dependencies
33+ run : dotnet restore
34+
35+ - name : Build
36+ run : dotnet build --no-restore
37+
38+ - name : Run tests
39+ run : dotnet test --no-build --verbosity normal
40+
41+ - name : Test
42+ # Using https://github.com/Tyrrrz/GitHubActionsTestLogger
43+ # Note: the space after the last double dash (--) is intentional
44+ run : >
45+ dotnet test
46+ --configuration Release
47+ --logger GitHubActions
48+ --
49+ RunConfiguration.CollectSourceInformation=true
You can’t perform that action at this time.
0 commit comments