-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
run-unit-tests.yml
59 lines (55 loc) · 1.71 KB
/
run-unit-tests.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
# Copyright (c) .NET Foundation and Contributors
# Portions Copyright (c) Sankarsan Kampa (a.k.a. k3rn31p4nic). All rights reserved.
# See LICENSE file in the project root for full license information.
parameters:
- name: skipInstall
type: boolean
default: false
- name: runUnitTests
type: boolean
default: true
- name: unitTestRunsettings
type: string
default: '$(System.DefaultWorkingDirectory)\nano.runsettings'
- name: packagesDirectory
type: string
default: '$(Build.SourcesDirectory)/packages'
steps:
- task: VisualStudioTestPlatformInstaller@1
condition: >-
and(
not(${{ parameters.skipInstall }}),
succeeded(),
${{ parameters.runUnitTests }},
eq(variables['StartReleaseCandidate'], false),
not(startsWith(variables['Build.SourceBranch'], 'refs/tags/v'))
)
displayName: 'Visual Studio Test Platform Installer'
inputs:
versionSelector: latestStable
- task: VSTest@2
condition: >-
and(
succeeded(),
${{ parameters.runUnitTests }},
eq(variables['StartReleaseCandidate'], false),
not(startsWith(variables['Build.SourceBranch'], 'refs/tags/v'))
)
displayName: 'Running Unit Tests'
continueOnError: false
inputs:
testSelector: 'testAssemblies'
testAssemblyVer2: |
**\NFUnitTest.dll
**\*Tests*.dll
!**\obj\**
!**\TestAdapter\**
!**\NFUnitTest_DummyAdapter\**
!**\nanoFramework.TestFramework\**
searchFolder: '$(System.DefaultWorkingDirectory)'
platform: '$(BuildPlatform)'
configuration: '$(BuildConfiguration)'
diagnosticsEnabled: true
vsTestVersion: toolsInstaller
codeCoverageEnabled: true
runSettingsFile: '${{ parameters.unitTestRunsettings }}'