-
Notifications
You must be signed in to change notification settings - Fork 4
41 lines (31 loc) · 830 Bytes
/
build.yml
File metadata and controls
41 lines (31 loc) · 830 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# .NET Build and Test Workflow
name: Build and Test
permissions:
contents: read
pull-requests: write
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup .NET SDKs
uses: actions/setup-dotnet@v4
with:
# .net 4.8.x is included by default in windows-latest
dotnet-version: |
8.0.x
9.0.x
- name: Restore dotnet tools
run: dotnet tool restore
- name: Restore dependencies
run: dotnet restore ./src
- name: Build
run: dotnet build ./src --no-restore -p:VersionFromCI="0.0.0-cibuild"
- name: Test
run: dotnet test ./src --no-build --verbosity normal