-
Notifications
You must be signed in to change notification settings - Fork 613
99 lines (81 loc) · 3.78 KB
/
Copy pathbuild.yml
File metadata and controls
99 lines (81 loc) · 3.78 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
name: Build ACAT
on:
workflow_dispatch:
permissions:
contents: read
jobs:
build:
strategy:
matrix:
configuration: [Release, Debug]
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
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
lfs: true # Enable Git LFS
# Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild
- name: Setup MSBuild.exe
uses: microsoft/setup-msbuild@v2
# Restore NuGet packages before building.
# Note: Some BCI extension projects require proprietary packages (UnicornDotNet, AcatCameraNative)
# not available on nuget.org; restore and build for those projects will fail gracefully.
- name: Restore dependencies
run: dotnet restore ACAT.sln
working-directory: src/
continue-on-error: true
# Build the full application
- name: Build the Solution
run: |
msbuild ACAT.sln /t:Build /p:Configuration=${{ matrix.configuration }}
working-directory: src/
continue-on-error: true
# Execute all test projects
- name: Run Unit Tests - Logging
run: |
dotnet test Libraries/ACATCore.Tests.Logging/ACATCore.Tests.Logging.csproj --configuration ${{ matrix.configuration }} --logger "trx;LogFileName=logging-tests.trx" --logger "console;verbosity=normal" --results-directory TestResults
working-directory: src/
continue-on-error: false
- name: Run Unit Tests - Configuration
run: |
dotnet test Libraries/ACATCore.Tests.Configuration/ACATCore.Tests.Configuration.csproj --configuration ${{ matrix.configuration }} --logger "trx;LogFileName=configuration-tests.trx" --logger "console;verbosity=normal" --results-directory TestResults
working-directory: src/
continue-on-error: false
- name: Run Integration Tests
run: |
dotnet test Libraries/ACATCore.Tests.Integration/ACATCore.Tests.Integration.csproj --configuration ${{ matrix.configuration }} --logger "trx;LogFileName=integration-tests.trx" --logger "console;verbosity=normal" --results-directory TestResults
working-directory: src/
continue-on-error: false
- name: Run ConfigMigrationTool Tests
run: |
dotnet test Applications/ConfigMigrationTool/ACAT.ConfigMigrationTool.Tests/ACAT.ConfigMigrationTool.Tests.csproj --configuration ${{ matrix.configuration }} --logger "trx;LogFileName=migration-tests.trx" --logger "console;verbosity=normal" --results-directory TestResults
working-directory: src/
continue-on-error: false
- name: Run Performance Tests
run: |
dotnet test Libraries/ACATCore.Tests.Performance/ACATCore.Tests.Performance.csproj --configuration ${{ matrix.configuration }} --logger "trx;LogFileName=performance-tests.trx" --logger "console;verbosity=normal" --results-directory TestResults
working-directory: src/
continue-on-error: false
# Publish test results
- name: Publish Test Results
uses: dorny/test-reporter@v1
if: always()
with:
name: Test Results (${{ matrix.configuration }})
path: 'src/TestResults/*.trx'
reporter: dotnet-trx
fail-on-error: true
# Upload test results as artifacts
- name: Upload Test Results
uses: actions/upload-artifact@v4.6.2
if: always()
with:
name: test-results-${{ matrix.configuration }}
path: src/TestResults/
- name: Upload release build artifacts
uses: actions/upload-artifact@v4.6.2
with:
name: acat_${{ matrix.configuration }}
path: src/Applications/ACATApp/bin/${{ matrix.configuration }}