1+ name : ElectronNET Integration Tests
2+
3+ on :
4+ push :
5+ branches : [ develop, main ]
6+ pull_request :
7+ branches : [ develop, main ]
8+
9+ concurrency :
10+ group : integration-tests-${{ github.ref }}
11+ cancel-in-progress : true
12+
13+ jobs :
14+ tests :
15+ name : Integration Tests (${{ matrix.os }})
16+ runs-on : ${{ matrix.os }}
17+ strategy :
18+ fail-fast : false
19+ matrix :
20+ include :
21+ - os : ubuntu-latest
22+ rid : linux-x64
23+ - os : windows-latest
24+ rid : win-x64
25+
26+ env :
27+ DOTNET_SKIP_FIRST_TIME_EXPERIENCE : 1
28+ DOTNET_NOLOGO : 1
29+ CI : true
30+ ELECTRON_ENABLE_LOGGING : 1
31+
32+ steps :
33+ - name : Checkout
34+ uses : actions/checkout@v4
35+
36+ - name : Setup .NET
37+ uses : actions/setup-dotnet@v4
38+ with :
39+ dotnet-version : ' 10.0.x'
40+ include-prerelease : false
41+
42+ - name : Setup Node.js
43+ uses : actions/setup-node@v4
44+ with :
45+ node-version : ' 22'
46+
47+ - name : Restore
48+ run : dotnet restore -r ${{ matrix.rid }} src/ElectronNET.IntegrationTests/ElectronNET.IntegrationTests.csproj
49+
50+ - name : Build
51+ run : dotnet build --no-restore -c Release -r ${{ matrix.rid }} src/ElectronNET.IntegrationTests/ElectronNET.IntegrationTests.csproj
52+
53+ - name : Install Linux GUI dependencies
54+ if : runner.os == 'Linux'
55+ run : |
56+ sudo apt-get update
57+ sudo apt-get install -y xvfb \
58+ libgtk-3-0 libnss3 libgdk-pixbuf2.0-0 libdrm2 libgbm1 libasound2 libxss1 libxtst6 libatk-bridge2.0-0 libatk1.0-0 libatspi2.0-0 libx11-xcb1
59+
60+ - name : Run tests (Linux)
61+ if : runner.os == 'Linux'
62+ run : |
63+ mkdir -p test-results
64+ xvfb-run -a dotnet test src/ElectronNET.IntegrationTests/ElectronNET.IntegrationTests.csproj \
65+ -c Release --no-build -r ${{ matrix.rid }} \
66+ --logger "trx;LogFileName=TestResults.trx" \
67+ --results-directory test-results
68+
69+ - name : Run tests (Windows)
70+ if : runner.os == 'Windows'
71+ run : |
72+ mkdir test-results
73+ dotnet test src/ElectronNET.IntegrationTests/ElectronNET.IntegrationTests.csproj \
74+ -c Release --no-build -r ${{ matrix.rid }} \
75+ --logger "trx;LogFileName=TestResults.trx" \
76+ --results-directory test-results
77+
78+ - name : Upload raw test results
79+ uses : actions/upload-artifact@v4
80+ with :
81+ name : test-results-${{ matrix.os }}
82+ path : test-results/*.trx
83+ retention-days : 7
84+
85+ - name : Publish Test Results (Checks UI)
86+ uses : EnricoMi/publish-unit-test-result-action@v2
87+ if : always()
88+ with :
89+ files : test-results/*.trx
90+ check_name : ElectronNET Integration Tests (${{ matrix.os }})
91+ comment_mode : off
92+
93+ summary :
94+ name : Aggregate
95+ runs-on : ubuntu-latest
96+ needs : [tests]
97+ steps :
98+ - name : Summary
99+ run : echo "All matrix test jobs completed."
0 commit comments