-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (40 loc) · 1.18 KB
/
build.yml
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
42
name: build
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
linux-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 7.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore --configuration Release
- name: Test
run: dotnet test --no-build --no-restore --configuration Release --verbosity normal -f net7.0
win-build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Setup MSBuild
uses: microsoft/setup-msbuild@v1
- name: Setup NuGet
uses: NuGet/[email protected]
- name: Setup VSTest
uses: darenm/Setup-VSTest@v1
- name: Navigate to Workspace
run: cd $GITHUB_WORKSPACE
- name: Restore Packages
run: nuget restore DivertR.sln
- name: Build Solution
run: |
msbuild.exe DivertR.sln /p:platform="Any CPU" /p:configuration="Release"
- name: Run Tests
run: vstest.console.exe .\test\DivertR.UnitTests\bin\Release\net472\DivertR.UnitTests.dll