11
11
required : true
12
12
13
13
jobs :
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."
17
21
22
+ electron-woa-testing :
23
+ if : ${{ github.event_name == 'workflow_dispatch' && github.repository == 'electron/electron' }}
24
+ runs-on : [self-hosted, woa]
18
25
permissions :
19
26
checks : write
20
27
pull-requests : write
21
-
22
28
steps :
23
29
-
uses :
LouisBrunner/[email protected]
24
- if : ${{ github.event_name == 'push' && github.repository == 'electron/electron' }}
25
30
with :
26
31
token : ${{ secrets.GITHUB_TOKEN }}
27
32
name : electron-woa-testing
28
33
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 }}"}
29
37
- name : Clean Workspace
30
- if : ${{ github.event_name == 'workflow_dispatch' }}
31
38
run : |
32
39
Remove-Item * -Recurse -Force
33
40
shell : powershell
34
41
- name : Checkout
35
42
uses : actions/checkout@v3
36
- if : ${{ github.event_name == 'workflow_dispatch' }}
37
43
with :
38
44
path : src\electron
39
45
fetch-depth : 0
40
46
- name : Yarn install
41
- if : ${{ github.event_name == 'workflow_dispatch' }}
42
47
run : |
43
48
cd src\electron
44
49
node script/yarn.js install --frozen-lockfile
45
50
- name : Download and extract dist.zip for test
46
- if : ${{ github.event_name == 'workflow_dispatch' }}
47
51
run : |
48
52
$localArtifactPath = "$pwd\dist.zip"
49
53
$serverArtifactPath = "https://ci.appveyor.com/api/buildjobs/${{ inputs.appveyor_job_id }}/artifacts/dist.zip"
50
54
Invoke-RestMethod -Method Get -Uri $serverArtifactPath -OutFile $localArtifactPath -Headers @{ "Authorization" = "Bearer ${{ secrets.APPVEYOR_TOKEN }}" }
51
55
& "${env:ProgramFiles(x86)}\7-Zip\7z.exe" x -osrc\out\Default -y $localArtifactPath
52
56
shell : powershell
53
57
- name : Download and extract native test executables for test
54
- if : ${{ github.event_name == 'workflow_dispatch' }}
55
58
run : |
56
59
$localArtifactPath = "src\out\Default\shell_browser_ui_unittests.exe"
57
60
$serverArtifactPath = "https://ci.appveyor.com/api/buildjobs/${{ inputs.appveyor_job_id }}/artifacts/shell_browser_ui_unittests.exe"
58
61
Invoke-RestMethod -Method Get -Uri $serverArtifactPath -OutFile $localArtifactPath -Headers @{ "Authorization" = "Bearer ${{ secrets.APPVEYOR_TOKEN }}" }
59
62
shell : powershell
60
63
- name : Download and extract ffmpeg.zip for test
61
- if : ${{ github.event_name == 'workflow_dispatch' }}
62
64
run : |
63
65
$localArtifactPath = "$pwd\ffmpeg.zip"
64
66
$serverArtifactPath = "https://ci.appveyor.com/api/buildjobs/${{ inputs.appveyor_job_id }}/artifacts/ffmpeg.zip"
65
67
Invoke-RestMethod -Method Get -Uri $serverArtifactPath -OutFile $localArtifactPath -Headers @{ "Authorization" = "Bearer ${{ secrets.APPVEYOR_TOKEN }}" }
66
68
& "${env:ProgramFiles(x86)}\7-Zip\7z.exe" x -osrc\out\ffmpeg $localArtifactPath
67
69
shell : powershell
68
70
- name : Download node headers for test
69
- if : ${{ github.event_name == 'workflow_dispatch' }}
70
71
run : |
71
72
$localArtifactPath = "src\node_headers.zip"
72
73
$serverArtifactPath = "https://ci.appveyor.com/api/buildjobs/${{ inputs.appveyor_job_id }}/artifacts/node_headers.zip"
75
76
& "${env:ProgramFiles(x86)}\7-Zip\7z.exe" x -y node_headers.zip
76
77
shell : powershell
77
78
- name : Download electron.lib for test
78
- if : ${{ github.event_name == 'workflow_dispatch' }}
79
79
run : |
80
80
$localArtifactPath = "src\out\Default\electron.lib"
81
81
$serverArtifactPath = "https://ci.appveyor.com/api/buildjobs/${{ inputs.appveyor_job_id }}/artifacts/electron.lib"
@@ -98,13 +98,11 @@ jobs:
98
98
# }
99
99
# shell: powershell
100
100
- name : Setup node headers
101
- if : ${{ github.event_name == 'workflow_dispatch' }}
102
101
run : |
103
102
New-Item src\out\Default\gen\node_headers\Release -Type directory
104
103
Copy-Item -path src\out\Default\electron.lib -destination src\out\Default\gen\node_headers\Release\node.lib
105
104
shell : powershell
106
105
- name : Run Electron Main process tests
107
- if : ${{ github.event_name == 'workflow_dispatch' }}
108
106
run : |
109
107
cd src
110
108
set npm_config_nodedir=%cd%\out\Default\gen\node_headers
@@ -120,7 +118,7 @@ jobs:
120
118
MOCHA_REPORTER : mocha-multi-reporters
121
119
ELECTRON_SKIP_NATIVE_MODULE_TESTS : true
122
120
- name : Run Electron Remote based tests
123
- if : ${{ github.event_name == 'workflow_dispatch' && ( success() || failure() ) }}
121
+ if : ${{ success() || failure() }}
124
122
run : |
125
123
cd src
126
124
set npm_config_nodedir=%cd%\out\Default\gen\node_headers
@@ -134,33 +132,47 @@ jobs:
134
132
MOCHA_MULTI_REPORTERS : ' mocha-junit-reporter, tap'
135
133
MOCHA_REPORTER : mocha-multi-reporters
136
134
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"
143
135
- name : Verify ffmpeg
144
- if : ${{ github.event_name == 'workflow_dispatch' }}
145
136
run : |
146
137
cd src
147
138
echo "Verifying non proprietary ffmpeg"
148
139
python electron\script\verify-ffmpeg.py --build-dir out\Default --source-root %cd% --ffmpeg-path out\ffmpeg
149
140
shell : cmd
150
141
- name : Kill processes left running from last test run
151
- if : ${{ github.event_name == 'workflow_dispatch' && (success() || failure()) || cancelled () }}
142
+ if : ${{ always () }}
152
143
run : |
153
144
Get-Process | Where Name -Like "electron*" | Stop-Process
154
145
Get-Process | Where Name -Like "msedge*" | Stop-Process
155
146
shell : powershell
156
147
- name : Delete user app data directories
157
- if : ${{ github.event_name == 'workflow_dispatch' && (success() || failure()) || cancelled () }}
148
+ if : ${{ always () }}
158
149
run : |
159
150
Remove-Item -path $env:APPDATA/Electron* -Recurse -Force -ErrorAction Ignore
160
151
shell : powershell
161
152
-
uses :
LouisBrunner/[email protected]
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/[email protected]
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/[email protected]
171
+ if : ${{ ! success() }}
163
172
with :
164
173
token : ${{ secrets.GITHUB_TOKEN }}
165
174
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