2019-08-21 21:37:30 +00:00
|
|
|
|
steps:
|
|
|
|
|
- task: CopyFiles@2
|
|
|
|
|
displayName: 'Copy Files to: src\electron'
|
|
|
|
|
inputs:
|
|
|
|
|
TargetFolder: src\electron
|
|
|
|
|
|
|
|
|
|
- script: |
|
|
|
|
|
cd src\electron
|
2019-09-03 17:13:06 +00:00
|
|
|
|
node script/yarn.js install --frozen-lockfile
|
|
|
|
|
displayName: 'Yarn install'
|
2019-08-21 21:37:30 +00:00
|
|
|
|
|
|
|
|
|
- powershell: |
|
|
|
|
|
$localArtifactPath = "$pwd\dist.zip"
|
|
|
|
|
$serverArtifactPath = "$env:APPVEYOR_URL/buildjobs/$env:APPVEYOR_JOB_ID/artifacts/dist.zip"
|
|
|
|
|
Invoke-RestMethod -Method Get -Uri $serverArtifactPath -OutFile $localArtifactPath -Headers @{ "Authorization" = "Bearer $env:APPVEYOR_TOKEN" }
|
|
|
|
|
& "${env:ProgramFiles(x86)}\7-Zip\7z.exe" x -osrc\out\Default -y $localArtifactPath
|
|
|
|
|
displayName: 'Download and extract dist.zip for test'
|
|
|
|
|
env:
|
|
|
|
|
APPVEYOR_TOKEN: $(APPVEYOR_TOKEN)
|
|
|
|
|
|
2019-10-03 20:21:30 +00:00
|
|
|
|
- powershell: |
|
|
|
|
|
$localArtifactPath = "$pwd\src\out\Default\shell_browser_ui_unittests.exe"
|
|
|
|
|
$serverArtifactPath = "$env:APPVEYOR_URL/buildjobs/$env:APPVEYOR_JOB_ID/artifacts/shell_browser_ui_unittests.exe"
|
|
|
|
|
Invoke-RestMethod -Method Get -Uri $serverArtifactPath -OutFile $localArtifactPath -Headers @{ "Authorization" = "Bearer $env:APPVEYOR_TOKEN" }
|
|
|
|
|
displayName: 'Download and extract native test executables for test'
|
|
|
|
|
env:
|
|
|
|
|
APPVEYOR_TOKEN: $(APPVEYOR_TOKEN)
|
|
|
|
|
|
2019-08-21 21:37:30 +00:00
|
|
|
|
- powershell: |
|
|
|
|
|
$localArtifactPath = "$pwd\ffmpeg.zip"
|
|
|
|
|
$serverArtifactPath = "$env:APPVEYOR_URL/buildjobs/$env:APPVEYOR_JOB_ID/artifacts/ffmpeg.zip"
|
|
|
|
|
Invoke-RestMethod -Method Get -Uri $serverArtifactPath -OutFile $localArtifactPath -Headers @{ "Authorization" = "Bearer $env:APPVEYOR_TOKEN" }
|
|
|
|
|
& "${env:ProgramFiles(x86)}\7-Zip\7z.exe" x -osrc\out\ffmpeg $localArtifactPath
|
|
|
|
|
displayName: 'Download and extract ffmpeg.zip for test'
|
|
|
|
|
env:
|
|
|
|
|
APPVEYOR_TOKEN: $(APPVEYOR_TOKEN)
|
|
|
|
|
|
|
|
|
|
- powershell: |
|
|
|
|
|
$localArtifactPath = "$pwd\src\node_headers.zip"
|
|
|
|
|
$serverArtifactPath = "$env:APPVEYOR_URL/buildjobs/$env:APPVEYOR_JOB_ID/artifacts/node_headers.zip"
|
|
|
|
|
Invoke-RestMethod -Method Get -Uri $serverArtifactPath -OutFile $localArtifactPath -Headers @{ "Authorization" = "Bearer $env:APPVEYOR_TOKEN" }
|
|
|
|
|
cd src
|
|
|
|
|
& "${env:ProgramFiles(x86)}\7-Zip\7z.exe" x -y node_headers.zip
|
|
|
|
|
displayName: 'Download node headers for test'
|
|
|
|
|
env:
|
|
|
|
|
APPVEYOR_TOKEN: $(APPVEYOR_TOKEN)
|
|
|
|
|
|
|
|
|
|
- powershell: |
|
|
|
|
|
$localArtifactPath = "$pwd\src\out\Default\electron.lib"
|
|
|
|
|
$serverArtifactPath = "$env:APPVEYOR_URL/buildjobs/$env:APPVEYOR_JOB_ID/artifacts/electron.lib"
|
|
|
|
|
Invoke-RestMethod -Method Get -Uri $serverArtifactPath -OutFile $localArtifactPath -Headers @{ "Authorization" = "Bearer $env:APPVEYOR_TOKEN" }
|
|
|
|
|
displayName: 'Download electron.lib for test'
|
|
|
|
|
env:
|
|
|
|
|
APPVEYOR_TOKEN: $(APPVEYOR_TOKEN)
|
|
|
|
|
|
|
|
|
|
- powershell: |
|
|
|
|
|
New-Item src\out\Default\gen\node_headers\Release -Type directory
|
|
|
|
|
Copy-Item -path src\out\Default\electron.lib -destination src\out\Default\gen\node_headers\Release\node.lib
|
|
|
|
|
displayName: 'Setup node headers'
|
|
|
|
|
|
|
|
|
|
- script: |
|
|
|
|
|
cd src
|
|
|
|
|
set npm_config_nodedir=%cd%\out\Default\gen\node_headers
|
|
|
|
|
set npm_config_arch=arm64
|
|
|
|
|
cd electron
|
2019-10-30 23:38:21 +00:00
|
|
|
|
node script/yarn test -- --enable-logging --verbose
|
2019-08-21 21:37:30 +00:00
|
|
|
|
displayName: 'Run Electron tests'
|
|
|
|
|
env:
|
|
|
|
|
ELECTRON_OUT_DIR: Default
|
|
|
|
|
IGNORE_YARN_INSTALL_ERROR: 1
|
2019-09-03 17:13:06 +00:00
|
|
|
|
ELECTRON_TEST_RESULTS_DIR: junit
|
|
|
|
|
MOCHA_MULTI_REPORTERS: 'mocha-junit-reporter, tap'
|
|
|
|
|
MOCHA_REPORTER: mocha-multi-reporters
|
|
|
|
|
|
|
|
|
|
- task: PublishTestResults@2
|
|
|
|
|
displayName: 'Publish Test Results'
|
|
|
|
|
inputs:
|
|
|
|
|
testResultsFiles: '*.xml'
|
|
|
|
|
searchFolder: '$(System.DefaultWorkingDirectory)/src/junit/'
|
|
|
|
|
condition: always()
|
2019-08-21 21:37:30 +00:00
|
|
|
|
|
|
|
|
|
- script: |
|
|
|
|
|
cd src
|
|
|
|
|
echo "Verifying non proprietary ffmpeg"
|
|
|
|
|
python electron\script\verify-ffmpeg.py --build-dir out\Default --source-root %cd% --ffmpeg-path out\ffmpeg
|
|
|
|
|
displayName: 'Verify ffmpeg'
|
|
|
|
|
|
2019-09-18 20:44:48 +00:00
|
|
|
|
- powershell: |
|
2019-09-19 15:35:31 +00:00
|
|
|
|
Get-Process | Where Name –Like "electron*" | Stop-Process
|
2020-04-29 18:06:38 +00:00
|
|
|
|
Get-Process | Where Name –Like "msedge*" | Stop-Process
|
2019-09-03 17:13:06 +00:00
|
|
|
|
displayName: 'Kill processes left running from last test run'
|
2019-10-30 23:38:21 +00:00
|
|
|
|
condition: always()
|
2020-08-24 16:58:55 +00:00
|
|
|
|
|
|
|
|
|
- powershell: |
|
|
|
|
|
Remove-Item -path $env:APPDATA/Electron* -Recurse
|
|
|
|
|
displayName: 'Delete user app data directories'
|
|
|
|
|
condition: always()
|