Skip to content

Commit 7c92a66

Browse files
authored
Create dotnet.yml
1 parent dddb2db commit 7c92a66

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

.github/workflows/dotnet.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: .NET
2+
3+
on:
4+
push:
5+
branches: [ "master" ]
6+
pull_request:
7+
branches: [ "master" ]
8+
9+
jobs:
10+
build:
11+
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
- name: Setup .NET
17+
uses: actions/setup-dotnet@v4
18+
with:
19+
dotnet-version: 8.0.x
20+
- uses: actions/cache@v3
21+
with:
22+
path: ~/.nuget/packages
23+
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }}
24+
restore-keys: |
25+
${{ runner.os }}-nuget
26+
- name: Restore dependencies
27+
run: dotnet restore
28+
- name: Build
29+
run: dotnet build --no-restore
30+
- name: Test
31+
run: dotnet test --no-build --verbosity normal
32+
- name: Upload dotnet test results
33+
uses: actions/upload-artifact@v4
34+
with:
35+
name: dotnet-results-${{ matrix.dotnet-version }}
36+
path: TestResults-${{ matrix.dotnet-version }}
37+
if: ${{ always() }}

0 commit comments

Comments
 (0)