-
Notifications
You must be signed in to change notification settings - Fork 3
54 lines (40 loc) · 1.68 KB
/
grasshopper-test.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: Test Grasshopper Plugin
on: [push, pull_request, release]
jobs:
test:
name: "Unit tests"
runs-on: windows-latest # For a list of available runner types, refer to
# https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on
env:
Solution_Name: Caribou
Tests_Name: Caribou.Tests # Replace with your test project name, i.e. MyWpfApp
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
# Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild
- name: Setup MSBuild.exe
uses: microsoft/[email protected]
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
# Add NuGet to the PATH: https://github.com/marketplace/actions/setup-nuget-exe-for-use-with-actions
- name: Setup NuGet
uses: NuGet/[email protected]
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
- name: Restore the project's packages
run: msbuild $env:Solution_Name /t:Restore /p:Configuration=Release
# Build the application
- name: Build the project
run: msbuild $env:Solution_Name /p:Configuration=Release
- name: Restore tests project's packages
run: msbuild $env:Tests_Name /t:Restore /p:Configuration="Debug"
- name: Build tests project
run: msbuild $env:Tests_Name /p:Configuration="Debug"
# Required to add VSTest to path (instead of adding mstest to path)
- name: Setup VSTest.exe
uses: Malcolmnixon/Setup-VSTest@v4
# Run the actual tests
- name: Run project's unit tests
run: vstest.console $env:Tests_Name\bin\Debug\net45\$env:Tests_Name.dll