File tree Expand file tree Collapse file tree 1 file changed +51
-0
lines changed Expand file tree Collapse file tree 1 file changed +51
-0
lines changed Original file line number Diff line number Diff line change 1+ name : .NET Build & Test
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ pull_request :
8+ branches :
9+ - main
10+
11+ permissions :
12+ contents : read
13+
14+ concurrency :
15+ group : ${{ github.workflow }}-${{ github.ref }}
16+ cancel-in-progress : true
17+
18+ jobs :
19+ build-and-test :
20+ runs-on : ubuntu-latest
21+
22+ steps :
23+ - name : Checkout
24+ uses : actions/checkout@v4
25+
26+ - name : Setup .NET
27+ uses : actions/setup-dotnet@v4
28+ with :
29+ dotnet-version : ' 9.0.x'
30+
31+ - name : Cache NuGet packages
32+ uses : actions/cache@v4
33+ with :
34+ path : ~/.nuget/packages
35+ key : ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }}
36+ restore-keys : |
37+ ${{ runner.os }}-nuget-
38+
39+ - name : Restore
40+ run : dotnet restore
41+
42+ - name : Restore .NET tools
43+ run : dotnet tool restore
44+
45+ - name : Build
46+ run : dotnet build --configuration Release --no-restore
47+
48+ - name : Test
49+ run : dotnet test --configuration Release --no-build --verbosity normal
50+
51+
You can’t perform that action at this time.
0 commit comments