-
Notifications
You must be signed in to change notification settings - Fork 143
54 lines (43 loc) · 1.53 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
43
44
45
46
47
48
49
50
51
52
53
54
name: Build and test
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: windows-latest
defaults:
run:
shell: pwsh
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Powershell version
run: Write-Host "Powershell version:" $PSVersionTable.PSVersion
- name: Add msbuild to PATH
uses: microsoft/[email protected]
- name: Setup NuGet
uses: NuGet/[email protected]
- name: Cache NuGet packages
uses: actions/cache@v2
with:
path: packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.config') }} #hash of packages files
restore-keys: |
${{ runner.os }}-nuget-
- name: Restore NuGet Packages
run: nuget restore OfficeToPDF.sln
- name: Build
run: msbuild --% /target:Build /property:Platform=x64;Configuration=Release /verbosity:minimal /m:1 OfficeToPDF.sln
- name: Test
run: '& "./packages/NUnit.ConsoleRunner.3.15.0/tools/nunit3-console.exe" --skipnontestassemblies --config=Release --result="TestResults.xml;transform=nunit3-junit.xslt" .\OfficeToPDF.Tests\bin\x64\Release\OfficeToPDF.Tests.dll'
- name: Test Report
uses: dorny/test-reporter@v1
if: success() || failure() # run this step even if previous step failed
with:
name: results # Name of the check run which will be created
path: TestResults.xml # Path to test results
reporter: java-junit