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