-
Notifications
You must be signed in to change notification settings - Fork 28
51 lines (38 loc) · 2.02 KB
/
continuous-integration-workflow.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
name: Unit tests
on: [push]
jobs:
build:
name: Unit tests
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Nuget
uses: nuget/setup-nuget@v1
- name: Nuget restore packages
run: nuget restore CppCoveragePlugin.sln
- name: Download OpenCppCoverage x64
run: Invoke-WebRequest -OutFile OpenCppCoverageSetup-x64-0.9.8.0.exe https://github.com/OpenCppCoverage/OpenCppCoverage/releases/download/release-0.9.8.0/OpenCppCoverageSetup-x64-0.9.8.0.exe
- name: Install OpenCppCoverage x64
run: ./OpenCppCoverageSetup-x64-0.9.8.0.exe /VERYSILENT /SUPPRESSMSGBOXES /DIR=VSPackage\OpenCppCoverage-x64
- name: Download OpenCppCoverage x86
run: Invoke-WebRequest -OutFile OpenCppCoverageSetup-x86-0.9.8.0.exe https://github.com/OpenCppCoverage/OpenCppCoverage/releases/download/release-0.9.8.0/OpenCppCoverageSetup-x86-0.9.8.0.exe
- name: Install OpenCppCoverage x86
run: ./OpenCppCoverageSetup-x86-0.9.8.0.exe /VERYSILENT /SUPPRESSMSGBOXES /DIR=VSPackage\OpenCppCoverage-x86
- name: Setup MSBuild
uses: microsoft/[email protected]
- name: Copy extra files
run: |
cp .\packages\Newtonsoft.Json.*\lib\net45\Newtonsoft.Json.dll VSPackage
cp C:\Windows\System32\msvcp140.dll VSPackage\OpenCppCoverage-x64
cp C:\Windows\System32\vcruntime140.dll VSPackage\OpenCppCoverage-x64
cp C:\Windows\SysWOW64\msvcp140.dll VSPackage\OpenCppCoverage-x86
cp C:\Windows\SysWOW64\vcruntime140.dll VSPackage\OpenCppCoverage-x86
- name: Build VSPackage
run: msbuild CppCoveragePlugin.sln /target:VSPackage /p:Platform="Any CPU"
- name: Build VSPackage_UnitTests
run: msbuild CppCoveragePlugin.sln /target:VSPackage_UnitTests /p:Platform="Any CPU"
- name: Setup VSTest
uses: darenm/Setup-VSTest@v1
- name: Run unit tests
run: VSTest.Console.exe VSPackage_UnitTests\\bin\\Debug\\VSPackage_UnitTests.exe