Skip to content

Commit 003b50c

Browse files
committed
add test workflow
1 parent fe7edc0 commit 003b50c

2 files changed

Lines changed: 95 additions & 0 deletions

File tree

.github/workflows/run-tests.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Run Tests
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
run-tests:
11+
runs-on: windows-latest
12+
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v3
16+
with:
17+
submodules: true
18+
19+
- name: Add msbuild to PATH
20+
uses: microsoft/setup-msbuild@v1.1
21+
22+
- name: Add vstest to PATH
23+
uses: darenm/Setup-VSTest@v1.2
24+
25+
- name: Create empty TeeChart license file
26+
run: |
27+
copy /Y nul > "BlueM.Opt\Main\My Project\TeeChart.licenses"
28+
copy /Y nul > "BlueM.Wave\source\My Project\TeeChart.licenses"
29+
copy /Y nul > "BlueM.Opt\Tests\SensiPlot_ParameterSampling\My Project\TeeChart.licenses"
30+
shell: cmd
31+
32+
- name: Build BlueM.Opt.Tests
33+
run: msbuild BlueM.Opt\Tests\BlueM.Opt.Tests\BlueM.Opt.Tests.vbproj -restore -property:Platform=x64 -property:Configuration=Debug
34+
35+
- name: Run Tests
36+
run: |
37+
vstest.console.exe BlueM.Opt\tests\BlueM.Opt.Tests\bin\x64\Debug\net48\BlueM.Opt.Tests.exe /Settings:BlueM.Opt\tests\BlueM.Opt.Tests\tests.runsettings
38+
39+
- name: Upload test results
40+
uses: actions/upload-artifact@v4
41+
with:
42+
name: test-results
43+
path: BlueM.Opt\Tests\BlueM.Opt.Tests\TestResults
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<RunSettings>
3+
<!-- Configurations that affect the Test Framework -->
4+
<RunConfiguration>
5+
<!-- Use 0 for maximum process-level parallelization. This does not force parallelization within the test DLL (on the thread-level). You can also change it from the Test menu; choose "Run tests in parallel". Unchecked = 1 (only 1), checked = 0 (max). -->
6+
<MaxCpuCount>1</MaxCpuCount>
7+
<!-- Path relative to directory that contains .runsettings file-->
8+
<ResultsDirectory>.\TestResults</ResultsDirectory>
9+
10+
<!-- Omit the whole tag for auto-detection. -->
11+
<!-- [x86] or x64, ARM, ARM64, s390x -->
12+
<!-- You can also change it from the Test menu; choose "Processor Architecture for AnyCPU Projects" -->
13+
<TargetPlatform>x64</TargetPlatform>
14+
15+
<!-- Any TargetFramework moniker or omit the whole tag for auto-detection. -->
16+
<!-- net48, [net40], net6.0, net5.0, netcoreapp3.1, uap10.0 etc. -->
17+
<TargetFrameworkVersion>net48</TargetFrameworkVersion>
18+
19+
</RunConfiguration>
20+
21+
<!-- Configuration for loggers -->
22+
<LoggerRunSettings>
23+
<Loggers>
24+
<Logger friendlyName="console" enabled="True" />
25+
<Logger friendlyName="trx" enabled="True">
26+
<Configuration>
27+
<LogFileName>test-results.trx</LogFileName>
28+
</Configuration>
29+
</Logger>
30+
<Logger friendlyName="html" enabled="True">
31+
<Configuration>
32+
<LogFileName>test-results.html</LogFileName>
33+
</Configuration>
34+
</Logger>
35+
<Logger friendlyName="blame" enabled="True" />
36+
</Loggers>
37+
</LoggerRunSettings>
38+
39+
<!-- Adapter Specific sections -->
40+
41+
<!-- MSTest adapter -->
42+
<MSTest>
43+
<MapInconclusiveToFailed>True</MapInconclusiveToFailed>
44+
<CaptureTraceOutput>false</CaptureTraceOutput>
45+
<DeleteDeploymentDirectoryAfterTestRunIsComplete>False</DeleteDeploymentDirectoryAfterTestRunIsComplete>
46+
<DeploymentEnabled>False</DeploymentEnabled>
47+
<AssemblyResolution>
48+
<Directory path="bin\x64\Debug\net48" includeSubDirectories="false"/>
49+
</AssemblyResolution>
50+
</MSTest>
51+
52+
</RunSettings>

0 commit comments

Comments
 (0)