-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (30 loc) · 1.06 KB
/
pull-request.yml
File metadata and controls
34 lines (30 loc) · 1.06 KB
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
name: Pull Request
on:
pull_request:
branches: [ master ]
env:
SOLUTION_NAME: BackMeUp.sln
PROJECT_NAME: BackMeUp
NUNIT_PATH: packages\NUnit.ConsoleRunner.3.12.0\tools
jobs:
test:
runs-on: windows-latest
steps:
- uses: actions/checkout@master
- name: Setup Nuget.exe
uses: nuget/setup-nuget@v1
- name: Restore packages
run: nuget restore ${{ env.SOLUTION_NAME }}
- name: Setup MSBuild.exe
uses: microsoft/setup-msbuild@v1.0.2
- name: Build with MSBuild
run: msbuild ${{ env.SOLUTION_NAME }} -p:Configuration=Release
- name: Run NUnit # very fragile
run: ${{ github.workspace }}\${{ env.NUNIT_PATH }}\nunit3-console.exe ${{ github.workspace }}\${{ env.PROJECT_NAME }}Tests\bin\Release\${{ env.PROJECT_NAME }}.UnitTests.dll
working-directory: ${{ github.workspace }}\${{ env.NUNIT_PATH }}
- name: Upload Artifact
if: ${{ always() }}
uses: actions/upload-artifact@master
with:
name: TestResult
path: ${{ github.workspace }}\${{ env.NUNIT_PATH }}\TestResult.xml