-
Notifications
You must be signed in to change notification settings - Fork 52
60 lines (46 loc) · 1.76 KB
/
test_pullrequest.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
name: Test pull request
on:
pull_request:
branches: [ master ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build and test Zero-K
runs-on: zk
steps:
- name: Setup MSBuild Path
uses: microsoft/[email protected]
with:
msbuild-architecture: x64
- name: Setup NuGet
uses: NuGet/[email protected]
- name: Setup VSTest.console.exe
uses: darenm/Setup-VSTest@v1
- name: Checkout
uses: actions/checkout@v2
with:
clean: true
- name: Restore NuGet Packages
run: nuget restore Zero-K.sln
- name: Build entire Zero-K
run: >
msbuild /t:Rebuild /p:Configuration=Release /p:Platform=x64
/p:DeployOnBuild=true /p:PublishProfile=Profile1
/p:DefineConstants="RELEASE"
/p:DefineConstants="TRACE"
/p:DefineConstants="TEST"
Zero-K.sln
- name: Run VSTest
run: vstest.console.exe /Platform:x64 /Framework:Framework45 /TestCaseFilter:TestCategory=Basic /Parallel /Logger:trx;LogFileName=test-results.trx ./Tests/bin/release/net48/Tests.dll
shell: cmd
- name: Test Report C#
if: (github.event.pull_request.head.repo.full_name == github.repository) && (success() || failure()) # run this step even if previous step failed but not on PR from forked repo
uses: dorny/test-reporter@v1
with:
name: Test results C# # Name of the check run which will be created
path: TestResults/test-results.trx
reporter: dotnet-trx