зеркало из https://github.com/electron/electron.git
66 строки
1.7 KiB
YAML
66 строки
1.7 KiB
YAML
steps:
|
|
- task: CopyFiles@2
|
|
displayName: 'Copy Files to: src/electron'
|
|
inputs:
|
|
TargetFolder: src/electron
|
|
|
|
- bash: |
|
|
cd src/electron
|
|
npm install --verbose
|
|
displayName: 'NPM install'
|
|
|
|
- bash: |
|
|
export ZIP_DEST=$PWD/src/out/Default
|
|
mkdir -p $ZIP_DEST
|
|
cd src/electron
|
|
node script/download-circleci-artifacts.js --buildNum=$CIRCLE_BUILD_NUM --name=dist.zip --dest=$ZIP_DEST
|
|
cd $ZIP_DEST
|
|
unzip -o dist.zip
|
|
displayName: 'Download and unzip dist files for test'
|
|
env:
|
|
CIRCLE_TOKEN: $(CIRCLECI_TOKEN)
|
|
|
|
- bash: |
|
|
export NODE_HEADERS_DEST=$PWD/src/out/Default/gen
|
|
mkdir -p $NODE_HEADERS_DEST
|
|
cd src/electron
|
|
node script/download-circleci-artifacts.js --buildNum=$CIRCLE_BUILD_NUM --name=node_headers.tar.gz --dest=$NODE_HEADERS_DEST
|
|
cd $NODE_HEADERS_DEST
|
|
tar xzf node_headers.tar.gz
|
|
displayName: 'Download and untar node header files for test'
|
|
env:
|
|
CIRCLE_TOKEN: $(CIRCLECI_TOKEN)
|
|
|
|
- bash: |
|
|
cd src
|
|
export npm_config_nodedir=$PWD/out/Default/gen/node_headers
|
|
cd electron/spec
|
|
npm install --verbose
|
|
displayName: Install test modules
|
|
|
|
- bash: |
|
|
sh -e /etc/init.d/xvfb start
|
|
displayName: Setup for headless testing
|
|
env:
|
|
DISPLAY: ":99.0"
|
|
|
|
- bash: |
|
|
cd src
|
|
./out/Default/electron electron/spec --ci
|
|
displayName: 'Run Electron tests'
|
|
timeoutInMinutes: 10
|
|
|
|
- task: PublishTestResults@2
|
|
displayName: 'Publish Test Results'
|
|
inputs:
|
|
testResultsFiles: '*.xml'
|
|
|
|
searchFolder: '$(System.DefaultWorkingDirectory)/src/junit/'
|
|
|
|
condition: succeededOrFailed()
|
|
|
|
- task: mspremier.PostBuildCleanup.PostBuildCleanup-task.PostBuildCleanup@3
|
|
displayName: 'Clean Agent Directories'
|
|
|
|
condition: always()
|