-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathappveyor.yml
More file actions
40 lines (40 loc) · 1.65 KB
/
appveyor.yml
File metadata and controls
40 lines (40 loc) · 1.65 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
35
36
37
38
39
40
image:
- Visual Studio 2019
environment:
CUSTOMER_TESTS_EXCEL_WRITE_TO_EXCEL: true
CUSTOMER_TESTS_RELATIVE_PATH_TO_EXCELTESTS: ..\..\..\..\SampleTests\ExcelTests
build_script:
- echo %CUSTOMER_TESTS_RELATIVE_PATH_TO_EXCELTESTS%
- dotnet restore CustomerTestsExcel.sln
- nuget restore SampleSystemUnderTest\SampleSystemUnderTest.csproj
# build GenerateCodeFromExcelTest.exe, which is used by GenerateTests.bat
- dotnet build CustomerTestsExcel.sln
# Ensure that the Excel tests can round trip to C#
# Regenerate the sample tests from the excel (requires GenerateCodeFromExcelTest.exe)
- dotnet test
- GenerateTests.bat
- dotnet build CustomerTestsExcel.sln
# run the tests, so that they re create the Excel Spreadsheets (requires some environment variables to be set)
- dotnet test
# Regenerate the sample tests again and build / test
- GenerateTests.bat
- dotnet build CustomerTestsExcel.sln
# run the unit tests and get coverage
- packages\OpenCover\4.7.922\tools\OpenCover.Console.exe -register:Path64 -target:"C:\Program Files\dotnet\dotnet.exe" -targetargs:"test" -output:"coverage.xml" -returntargetcode -oldstyle
test_script:
# upload the code coverage to codcov.io
- ps: |
$env:PATH = 'C:\msys64\usr\bin;' + $env:PATH
Invoke-WebRequest -Uri 'https://codecov.io/bash' -OutFile codecov.sh
bash codecov.sh -f "coverage.xml" -U "-s" -A "-s"
artifacts:
# The nuget package is created during `dotnet build`
- path: 'CustomerTestsExcel\**\*.nupkg'
notifications:
- provider: Email
to:
- '{{commitAuthorEmail}}'
subject: 'Build {{status}}'
on_build_success: false
on_build_failure: true
on_build_status_changed: true