-
-
Notifications
You must be signed in to change notification settings - Fork 16
60 lines (48 loc) · 1.57 KB
/
PR.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: WeSay CI workflow
on:
pull_request:
branches: [ develop ]
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [windows-2019]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v2.3.4
with:
fetch-depth: 0
# Install the .NET Core workload
- name: Install .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.x
# Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild
- name: Setup MSBuild.exe (Windows OS)
uses: microsoft/setup-msbuild@v1.0.2
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true # So the PATH can be set by this step
if: ${{ matrix.os == 'windows-2019' }}
# Run the unit tests
- name: Restore
run: nuget restore WeSay.sln
- name: Build
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true # So gitversion can set environment vars during the build
run: msbuild WeSay.sln
- name: Prepare to Test
run: msbuild build/WeSay.proj /t:RestoreBuildTasks
- name: Test
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true # So testing files and folders can be created
run: msbuild build/WeSay.proj /t:TestOnly /p:Configuration=Debug /p:Platform="x86" /p:CI=true /v:diag
- name: Test Report
uses: jasonleenaylor/nunit-reporter@63ab85dd5da111c3f4ef95f2fb73bbe667f58db9
if: always()
with:
path: output/**/TestResults.xml
access-token: ${{ secrets.GITHUB_TOKEN }}
reportTitle: "Test Results (${{ matrix.os }})"
numFailures: