Skip to content

Commit d53fcd7

Browse files
authored
Fixes #4374 - Nukes all (?) legacy Driver and Application stuff; revamps tests (#4376)
1 parent 559dea9 commit d53fcd7

File tree

310 files changed

+14563
-16647
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

310 files changed

+14563
-16647
lines changed

.github/workflows/build.yml renamed to .github/workflows/build-validation.yml

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build Solution
1+
name: Build Validation
22

33
on:
44
push:
@@ -9,18 +9,11 @@ on:
99
branches: [ v2_release, v2_develop ]
1010
paths-ignore:
1111
- '**.md'
12-
workflow_call:
13-
outputs:
14-
artifact-name:
15-
description: "Name of the build artifacts"
16-
value: ${{ jobs.build.outputs.artifact-name }}
1712

1813
jobs:
19-
build:
20-
name: Build Debug & Release
14+
build-validation:
15+
name: Build All Configurations
2116
runs-on: ubuntu-latest
22-
outputs:
23-
artifact-name: build-artifacts
2417

2518
timeout-minutes: 10
2619
steps:
@@ -63,14 +56,3 @@ jobs:
6356
6457
- name: Build Release Solution
6558
run: dotnet build --configuration Release --no-restore -property:NoWarn=0618%3B0612
66-
67-
- name: Upload build artifacts
68-
uses: actions/upload-artifact@v4
69-
with:
70-
name: build-artifacts
71-
path: |
72-
**/bin/Debug/**
73-
**/obj/Debug/**
74-
**/bin/Release/**
75-
**/obj/Release/**
76-
retention-days: 1
Lines changed: 77 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
name: Build & Run Integration Tests
2-
32
on:
43
push:
54
branches: [ v2_release, v2_develop ]
@@ -9,57 +8,99 @@ on:
98
branches: [ v2_release, v2_develop ]
109
paths-ignore:
1110
- '**.md'
12-
11+
1312
jobs:
14-
# Call the build workflow to build the solution once
1513
build:
16-
uses: ./.github/workflows/build.yml
14+
uses: ./.github/workflows/quick-build.yml
1715

1816
integration_tests:
1917
name: Integration Tests
2018
runs-on: ${{ matrix.os }}
2119
needs: build
2220
strategy:
23-
# Turn off fail-fast to let all runners run even if there are errors
24-
fail-fast: true
21+
fail-fast: false # Let all OSes finish even if one fails
2522
matrix:
2623
os: [ ubuntu-latest, windows-latest, macos-latest ]
24+
timeout-minutes: 15
2725

28-
timeout-minutes: 10
2926
steps:
27+
- name: Checkout code
28+
uses: actions/checkout@v4
29+
30+
- name: Setup .NET Core
31+
uses: actions/setup-dotnet@v4
32+
with:
33+
dotnet-version: 8.x
34+
dotnet-quality: ga
35+
36+
- name: Download build artifacts
37+
uses: actions/download-artifact@v4
38+
with:
39+
name: test-build-artifacts
40+
path: .
3041

31-
- name: Checkout code
32-
uses: actions/checkout@v4
42+
- name: Restore NuGet packages
43+
run: dotnet restore
3344

34-
- name: Setup .NET Core
35-
uses: actions/setup-dotnet@v4
36-
with:
37-
dotnet-version: 8.x
38-
dotnet-quality: 'ga'
45+
- name: Disable Windows Defender (Windows only)
46+
if: runner.os == 'Windows'
47+
shell: powershell
48+
run: |
49+
Add-MpPreference -ExclusionPath "${{ github.workspace }}"
50+
Add-MpPreference -ExclusionProcess "dotnet.exe"
51+
Add-MpPreference -ExclusionProcess "testhost.exe"
52+
Add-MpPreference -ExclusionProcess "VSTest.Console.exe"
3953
40-
- name: Download build artifacts
41-
uses: actions/download-artifact@v4
42-
with:
43-
name: build-artifacts
44-
path: .
54+
- name: Set VSTEST_DUMP_PATH
55+
shell: bash
56+
run: echo "VSTEST_DUMP_PATH=logs/IntegrationTests/${{ runner.os }}/" >> $GITHUB_ENV
4557

46-
- name: Restore NuGet packages
47-
run: dotnet restore
58+
- name: Run IntegrationTests
59+
shell: bash
60+
run: |
61+
if [ "${{ runner.os }}" == "Linux" ]; then
62+
# Run with coverage on Linux only
63+
dotnet test Tests/IntegrationTests \
64+
--no-build \
65+
--verbosity minimal \
66+
--collect:"XPlat Code Coverage" \
67+
--settings Tests/IntegrationTests/runsettings.coverage.xml \
68+
--diag:logs/IntegrationTests/${{ runner.os }}/logs.txt \
69+
--blame \
70+
--blame-crash \
71+
--blame-hang \
72+
--blame-hang-timeout 60s \
73+
--blame-crash-collect-always
74+
else
75+
# Run without coverage on Windows/macOS for speed
76+
dotnet test Tests/IntegrationTests \
77+
--no-build \
78+
--verbosity minimal \
79+
--settings Tests/IntegrationTests/runsettings.xml \
80+
--diag:logs/IntegrationTests/${{ runner.os }}/logs.txt \
81+
--blame \
82+
--blame-crash \
83+
--blame-hang \
84+
--blame-hang-timeout 60s \
85+
--blame-crash-collect-always
86+
fi
4887
49-
- name: Set VSTEST_DUMP_PATH
50-
shell: bash
51-
run: echo "{VSTEST_DUMP_PATH}={logs/${{ runner.os }}/}" >> $GITHUB_ENV
88+
- name: Upload Integration Test Logs
89+
if: always()
90+
uses: actions/upload-artifact@v4
91+
with:
92+
name: integration_tests-logs-${{ runner.os }}
93+
path: |
94+
logs/IntegrationTests/
95+
TestResults/
5296
53-
- name: Run IntegrationTests
54-
run: |
55-
dotnet test Tests/IntegrationTests --no-build --verbosity normal --diag:logs/${{ runner.os }}/logs.txt --blame --blame-crash --blame-hang --blame-hang-timeout 60s --blame-crash-collect-always -- xunit.stopOnFail=true
56-
57-
- name: Upload Test Logs
58-
if: always()
59-
uses: actions/upload-artifact@v4
60-
with:
61-
name: integration-test-logs-${{ runner.os }}
62-
path: |
63-
logs/
64-
TestResults/IntegrationTests/
97+
- name: Upload Integration Tests Coverage to Codecov
98+
if: matrix.os == 'ubuntu-latest' && always()
99+
uses: codecov/codecov-action@v4
100+
with:
101+
files: TestResults/**/coverage.cobertura.xml
102+
flags: integrationtests
103+
name: IntegrationTests-${{ runner.os }}
104+
token: ${{ secrets.CODECOV_TOKEN }}
105+
fail_ci_if_error: false
65106

.github/workflows/quick-build.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Quick Build for Tests
2+
3+
on:
4+
workflow_call:
5+
outputs:
6+
artifact-name:
7+
description: "Name of the build artifacts"
8+
value: ${{ jobs.quick-build.outputs.artifact-name }}
9+
10+
jobs:
11+
quick-build:
12+
name: Build Debug Only
13+
runs-on: ubuntu-latest
14+
outputs:
15+
artifact-name: test-build-artifacts
16+
17+
timeout-minutes: 5
18+
steps:
19+
20+
- name: Checkout code
21+
uses: actions/checkout@v4
22+
23+
- name: Setup .NET Core
24+
uses: actions/setup-dotnet@v4
25+
with:
26+
dotnet-version: 8.x
27+
dotnet-quality: 'ga'
28+
29+
- name: Restore dependencies
30+
run: dotnet restore
31+
32+
# Suppress CS0618 (member is obsolete) and CS0612 (member is obsolete without message)
33+
- name: Build Debug
34+
run: dotnet build --configuration Debug --no-restore -property:NoWarn=0618%3B0612
35+
36+
- name: Upload build artifacts
37+
uses: actions/upload-artifact@v4
38+
with:
39+
name: test-build-artifacts
40+
path: |
41+
**/bin/Debug/**
42+
**/obj/Debug/**
43+
retention-days: 1

0 commit comments

Comments
 (0)