1111 required : true
1212
1313jobs :
14- electron-woa-testing :
15-
16- runs-on : [self-hosted, woa]
14+ electron-woa-init :
15+ if : ${{ github.event_name == 'push' && github.repository == 'electron/electron' }}
16+ runs-on : ubuntu-latest
17+ steps :
18+ - name : Dummy step for push event
19+ run : |
20+ echo "This job is a needed initialization step for Electron WOA testing. Another test result will appear once the electron-woa-testing build is done."
1721
22+ electron-woa-testing :
23+ if : ${{ github.event_name == 'workflow_dispatch' && github.repository == 'electron/electron' }}
24+ runs-on : [self-hosted, woa]
1825 permissions :
1926 checks : write
2027 pull-requests : write
21-
2228 steps :
2329 - uses : LouisBrunner/checks-action@v1.1.1
24- if : ${{ github.event_name == 'push' && github.repository == 'electron/electron' }}
2530 with :
2631 token : ${{ secrets.GITHUB_TOKEN }}
2732 name : electron-woa-testing
2833 status : in_progress
34+ details_url : ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
35+ output : |
36+ {"summary":"Test In Progress","text_description":"See job details here: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"}
2937 - name : Clean Workspace
30- if : ${{ github.event_name == 'workflow_dispatch' }}
3138 run : |
3239 Remove-Item * -Recurse -Force
3340 shell : powershell
3441 - name : Checkout
3542 uses : actions/checkout@v3
36- if : ${{ github.event_name == 'workflow_dispatch' }}
3743 with :
3844 path : src\electron
3945 fetch-depth : 0
4046 - name : Yarn install
41- if : ${{ github.event_name == 'workflow_dispatch' }}
4247 run : |
4348 cd src\electron
4449 node script/yarn.js install --frozen-lockfile
4550 - name : Download and extract dist.zip for test
46- if : ${{ github.event_name == 'workflow_dispatch' }}
4751 run : |
4852 $localArtifactPath = "$pwd\dist.zip"
4953 $serverArtifactPath = "https://ci.appveyor.com/api/buildjobs/${{ inputs.appveyor_job_id }}/artifacts/dist.zip"
5054 Invoke-RestMethod -Method Get -Uri $serverArtifactPath -OutFile $localArtifactPath -Headers @{ "Authorization" = "Bearer ${{ secrets.APPVEYOR_TOKEN }}" }
5155 & "${env:ProgramFiles(x86)}\7-Zip\7z.exe" x -osrc\out\Default -y $localArtifactPath
5256 shell : powershell
5357 - name : Download and extract native test executables for test
54- if : ${{ github.event_name == 'workflow_dispatch' }}
5558 run : |
5659 $localArtifactPath = "src\out\Default\shell_browser_ui_unittests.exe"
5760 $serverArtifactPath = "https://ci.appveyor.com/api/buildjobs/${{ inputs.appveyor_job_id }}/artifacts/shell_browser_ui_unittests.exe"
5861 Invoke-RestMethod -Method Get -Uri $serverArtifactPath -OutFile $localArtifactPath -Headers @{ "Authorization" = "Bearer ${{ secrets.APPVEYOR_TOKEN }}" }
5962 shell : powershell
6063 - name : Download and extract ffmpeg.zip for test
61- if : ${{ github.event_name == 'workflow_dispatch' }}
6264 run : |
6365 $localArtifactPath = "$pwd\ffmpeg.zip"
6466 $serverArtifactPath = "https://ci.appveyor.com/api/buildjobs/${{ inputs.appveyor_job_id }}/artifacts/ffmpeg.zip"
6567 Invoke-RestMethod -Method Get -Uri $serverArtifactPath -OutFile $localArtifactPath -Headers @{ "Authorization" = "Bearer ${{ secrets.APPVEYOR_TOKEN }}" }
6668 & "${env:ProgramFiles(x86)}\7-Zip\7z.exe" x -osrc\out\ffmpeg $localArtifactPath
6769 shell : powershell
6870 - name : Download node headers for test
69- if : ${{ github.event_name == 'workflow_dispatch' }}
7071 run : |
7172 $localArtifactPath = "src\node_headers.zip"
7273 $serverArtifactPath = "https://ci.appveyor.com/api/buildjobs/${{ inputs.appveyor_job_id }}/artifacts/node_headers.zip"
7576 & "${env:ProgramFiles(x86)}\7-Zip\7z.exe" x -y node_headers.zip
7677 shell : powershell
7778 - name : Download electron.lib for test
78- if : ${{ github.event_name == 'workflow_dispatch' }}
7979 run : |
8080 $localArtifactPath = "src\out\Default\electron.lib"
8181 $serverArtifactPath = "https://ci.appveyor.com/api/buildjobs/${{ inputs.appveyor_job_id }}/artifacts/electron.lib"
@@ -98,13 +98,11 @@ jobs:
9898 # }
9999 # shell: powershell
100100 - name : Setup node headers
101- if : ${{ github.event_name == 'workflow_dispatch' }}
102101 run : |
103102 New-Item src\out\Default\gen\node_headers\Release -Type directory
104103 Copy-Item -path src\out\Default\electron.lib -destination src\out\Default\gen\node_headers\Release\node.lib
105104 shell : powershell
106105 - name : Run Electron Main process tests
107- if : ${{ github.event_name == 'workflow_dispatch' }}
108106 run : |
109107 cd src
110108 set npm_config_nodedir=%cd%\out\Default\gen\node_headers
@@ -120,7 +118,7 @@ jobs:
120118 MOCHA_REPORTER : mocha-multi-reporters
121119 ELECTRON_SKIP_NATIVE_MODULE_TESTS : true
122120 - name : Run Electron Remote based tests
123- if : ${{ github.event_name == 'workflow_dispatch' && ( success() || failure() ) }}
121+ if : ${{ success() || failure() }}
124122 run : |
125123 cd src
126124 set npm_config_nodedir=%cd%\out\Default\gen\node_headers
@@ -134,33 +132,47 @@ jobs:
134132 MOCHA_MULTI_REPORTERS : ' mocha-junit-reporter, tap'
135133 MOCHA_REPORTER : mocha-multi-reporters
136134 ELECTRON_SKIP_NATIVE_MODULE_TESTS : true
137- - name : Publish Test Results
138- uses : EnricoMi/publish-unit-test-result-action/composite@v1
139- if : ${{ github.event_name == 'workflow_dispatch' && (success() || failure()) }}
140- with :
141- files : " src/junit/**/*.xml"
142- check_name : " electron-woa-testing"
143135 - name : Verify ffmpeg
144- if : ${{ github.event_name == 'workflow_dispatch' }}
145136 run : |
146137 cd src
147138 echo "Verifying non proprietary ffmpeg"
148139 python electron\script\verify-ffmpeg.py --build-dir out\Default --source-root %cd% --ffmpeg-path out\ffmpeg
149140 shell : cmd
150141 - name : Kill processes left running from last test run
151- if : ${{ github.event_name == 'workflow_dispatch' && (success() || failure()) || cancelled () }}
142+ if : ${{ always () }}
152143 run : |
153144 Get-Process | Where Name -Like "electron*" | Stop-Process
154145 Get-Process | Where Name -Like "msedge*" | Stop-Process
155146 shell : powershell
156147 - name : Delete user app data directories
157- if : ${{ github.event_name == 'workflow_dispatch' && (success() || failure()) || cancelled () }}
148+ if : ${{ always () }}
158149 run : |
159150 Remove-Item -path $env:APPDATA/Electron* -Recurse -Force -ErrorAction Ignore
160151 shell : powershell
161152 - uses : LouisBrunner/checks-action@v1.1.1
162- if : ${{ github.event_name == 'workflow_dispatch' && (success() || failure()) || cancelled() }}
153+ if : ${{ success() }}
154+ with :
155+ token : ${{ secrets.GITHUB_TOKEN }}
156+ name : electron-woa-testing
157+ conclusion : " ${{ job.status }}"
158+ details_url : ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
159+ output : |
160+ {"summary":"${{ job.status }}","text_description":"See job details here: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"}
161+ - uses : LouisBrunner/checks-action@v1.1.1
162+ if : ${{ success() }}
163+ with :
164+ token : ${{ secrets.GITHUB_TOKEN }}
165+ name : electron-woa-testing
166+ conclusion : " ${{ job.status }}"
167+ details_url : ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
168+ output : |
169+ {"summary":"Job Succeeded","text_description":"See job details here: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"}
170+ - uses : LouisBrunner/checks-action@v1.1.1
171+ if : ${{ ! success() }}
163172 with :
164173 token : ${{ secrets.GITHUB_TOKEN }}
165174 name : electron-woa-testing
166- conclusion : " ${{ job.status }}"
175+ conclusion : " ${{ job.status }}"
176+ details_url : ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
177+ output : |
178+ {"summary":"Job Failed","text_description":"See job details here: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"}
0 commit comments