2019-04-07 09:07:52 +03:00
|
|
|
trigger:
|
|
|
|
- master
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
- job: Build
|
|
|
|
displayName: Build
|
|
|
|
pool:
|
|
|
|
vmImage: 'Ubuntu-16.04'
|
|
|
|
steps:
|
|
|
|
- task: NodeTool@0
|
|
|
|
inputs:
|
|
|
|
versionSpec: '10.x'
|
|
|
|
displayName: 'Install Node.js'
|
|
|
|
- task: Npm@0
|
|
|
|
inputs:
|
|
|
|
command: install
|
|
|
|
- script: npm run build
|
|
|
|
displayName: Build
|
2019-04-07 22:49:10 +03:00
|
|
|
- script: |
|
|
|
|
npm pack
|
|
|
|
mv html2canvas-*.tgz html2canvas.tgz
|
|
|
|
tar --list --verbose --file=html2canvas.tgz
|
|
|
|
displayName: Pack
|
|
|
|
name: pack
|
|
|
|
- task: PublishBuildArtifacts@1
|
|
|
|
inputs:
|
|
|
|
PathtoPublish: html2canvas.tgz
|
|
|
|
artifactName: npm
|
2019-04-07 09:07:52 +03:00
|
|
|
- task: PublishBuildArtifacts@1
|
|
|
|
inputs:
|
|
|
|
PathtoPublish: 'dist'
|
|
|
|
artifactName: dist
|
|
|
|
- task: PublishBuildArtifacts@1
|
|
|
|
inputs:
|
|
|
|
PathtoPublish: 'build'
|
|
|
|
artifactName: build
|
2019-04-13 09:17:23 +03:00
|
|
|
|
2019-04-07 09:07:52 +03:00
|
|
|
- job: Test
|
|
|
|
displayName: Tests
|
|
|
|
pool:
|
|
|
|
vmImage: 'Ubuntu-16.04'
|
|
|
|
steps:
|
|
|
|
- task: NodeTool@0
|
|
|
|
inputs:
|
|
|
|
versionSpec: '10.x'
|
|
|
|
displayName: 'Install Node.js'
|
|
|
|
- task: Npm@0
|
|
|
|
inputs:
|
|
|
|
command: install
|
|
|
|
- script: npm run build
|
|
|
|
displayName: Build
|
|
|
|
- script: npm run lint
|
|
|
|
displayName: Lint
|
2019-05-26 01:54:41 +03:00
|
|
|
- script: npm run unittest
|
2019-04-07 09:07:52 +03:00
|
|
|
displayName: Unit tests
|
2019-04-11 07:09:08 +03:00
|
|
|
|
|
|
|
- template: ci/browser-tests.yml
|
|
|
|
parameters:
|
|
|
|
name: Browser_Tests_Linux_Firefox_Stable
|
|
|
|
displayName: Linux Firefox Stable
|
|
|
|
vmImage: 'ubuntu-16.04'
|
|
|
|
targetBrowser: Firefox_Stable
|
|
|
|
xvfb: true
|
|
|
|
|
|
|
|
- template: ci/browser-tests.yml
|
|
|
|
parameters:
|
|
|
|
name: Browser_Tests_Linux_Chrome_Stable
|
|
|
|
displayName: Linux Chrome Stable
|
|
|
|
vmImage: 'ubuntu-16.04'
|
|
|
|
targetBrowser: Chrome_Stable
|
|
|
|
xvfb: true
|
|
|
|
|
|
|
|
- template: ci/browser-tests.yml
|
|
|
|
parameters:
|
|
|
|
name: Browser_Tests_OSX_Safari_IOS_9
|
|
|
|
displayName: iOS Simulator Safari 9
|
2020-04-15 08:03:04 +03:00
|
|
|
vmImage: 'macOS-10.14'
|
2019-04-11 07:09:08 +03:00
|
|
|
targetBrowser: Safari_IOS_9
|
|
|
|
|
|
|
|
- template: ci/browser-tests.yml
|
|
|
|
parameters:
|
|
|
|
name: Browser_Tests_OSX_Safari_IOS_10
|
|
|
|
displayName: iOS Simulator Safari 10
|
2020-04-15 08:03:04 +03:00
|
|
|
vmImage: 'macOS-10.14'
|
2019-04-11 07:09:08 +03:00
|
|
|
targetBrowser: Safari_IOS_10
|
|
|
|
|
|
|
|
- template: ci/browser-tests.yml
|
|
|
|
parameters:
|
2019-05-26 01:54:41 +03:00
|
|
|
name: Browser_Tests_OSX_Safari_IOS_12
|
|
|
|
displayName: iOS Simulator Safari 12
|
2020-04-15 08:03:04 +03:00
|
|
|
vmImage: 'macOS-10.14'
|
2019-05-26 01:54:41 +03:00
|
|
|
targetBrowser: Safari_IOS_12
|
2020-04-15 08:03:04 +03:00
|
|
|
xcodeSelection: '/Applications/Xcode_10.1.app'
|
2019-04-11 07:09:08 +03:00
|
|
|
|
|
|
|
- template: ci/browser-tests.yml
|
|
|
|
parameters:
|
|
|
|
name: Browser_Tests_OSX_Safari_Stable
|
|
|
|
displayName: OSX Safari Stable
|
2020-04-15 08:03:04 +03:00
|
|
|
vmImage: 'macOS-10.14'
|
2019-04-11 07:09:08 +03:00
|
|
|
targetBrowser: Safari_Stable
|
|
|
|
|
|
|
|
- template: ci/browser-tests.yml
|
|
|
|
parameters:
|
|
|
|
name: Browser_Tests_Windows_IE9
|
|
|
|
displayName: Windows Internet Explorer 9 (Emulated)
|
2019-04-07 09:07:52 +03:00
|
|
|
vmImage: 'vs2017-win2016'
|
2019-04-11 07:09:08 +03:00
|
|
|
targetBrowser: IE_9
|
|
|
|
|
|
|
|
- template: ci/browser-tests.yml
|
|
|
|
parameters:
|
|
|
|
name: Browser_Tests_Windows_IE10
|
|
|
|
displayName: Windows Internet Explorer 10 (Emulated)
|
2019-04-07 09:07:52 +03:00
|
|
|
vmImage: 'vs2017-win2016'
|
2019-04-11 07:09:08 +03:00
|
|
|
targetBrowser: IE_10
|
|
|
|
|
|
|
|
- template: ci/browser-tests.yml
|
|
|
|
parameters:
|
|
|
|
name: Browser_Tests_Windows_IE11
|
|
|
|
displayName: Windows Internet Explorer 11
|
2019-04-07 09:07:52 +03:00
|
|
|
vmImage: 'vs2017-win2016'
|
2019-04-11 07:09:08 +03:00
|
|
|
targetBrowser: IE_11
|
2019-04-13 09:17:23 +03:00
|
|
|
|
|
|
|
- job: Build_docs
|
|
|
|
displayName: Build docs
|
|
|
|
pool:
|
|
|
|
vmImage: 'Ubuntu-16.04'
|
|
|
|
dependsOn:
|
|
|
|
- Browser_Tests_Linux_Firefox_Stable
|
|
|
|
- Browser_Tests_Linux_Chrome_Stable
|
|
|
|
- Browser_Tests_OSX_Safari_IOS_9
|
|
|
|
- Browser_Tests_OSX_Safari_IOS_10
|
2019-05-26 01:54:41 +03:00
|
|
|
- Browser_Tests_OSX_Safari_IOS_12
|
2019-04-13 09:17:23 +03:00
|
|
|
- Browser_Tests_OSX_Safari_Stable
|
|
|
|
- Browser_Tests_Windows_IE9
|
|
|
|
- Browser_Tests_Windows_IE10
|
|
|
|
- Browser_Tests_Windows_IE11
|
|
|
|
steps:
|
|
|
|
- task: NodeTool@0
|
|
|
|
inputs:
|
|
|
|
versionSpec: '10.x'
|
|
|
|
displayName: 'Install Node.js'
|
|
|
|
- task: Npm@0
|
|
|
|
inputs:
|
|
|
|
command: install
|
|
|
|
- task: DownloadBuildArtifacts@0
|
|
|
|
displayName: 'Download test results'
|
|
|
|
inputs:
|
|
|
|
artifactName: ReftestResults
|
|
|
|
downloadPath: $(System.DefaultWorkingDirectory)
|
|
|
|
- task: DownloadBuildArtifacts@0
|
|
|
|
displayName: 'Download dist'
|
|
|
|
inputs:
|
|
|
|
artifactName: dist
|
|
|
|
downloadPath: $(System.DefaultWorkingDirectory)
|
2019-05-26 01:54:41 +03:00
|
|
|
- script: cp -R tests/reftests www/static/tests/reftests && cp -R tests/assets www/static/tests/assets && cp tests/test.js www/static/tests/test.js && cp -R ReftestResults ./www/static/results
|
2019-04-13 09:17:23 +03:00
|
|
|
displayName: Copy reftests to docs website
|
|
|
|
- script: cp -R dist ./www/static/dist
|
|
|
|
displayName: Copy dist to docs website
|
|
|
|
- script: npm run build:reftest-result-list www/static/results/metadata www/src/results.json
|
|
|
|
displayName: Create reftest result index
|
|
|
|
- script: npm run build:reftest-preview
|
|
|
|
displayName: Create reftest previewer
|
|
|
|
- script: rm -rf www/static/results/metadata
|
|
|
|
displayName: Clean metadata folder
|
|
|
|
- script: npm run build && cd www && npm install && npm run build && cd ..
|
|
|
|
displayName: Build docs
|
|
|
|
- task: PublishBuildArtifacts@1
|
|
|
|
displayName: Upload docs website artifact
|
|
|
|
inputs:
|
|
|
|
PathtoPublish: 'www/public'
|
|
|
|
artifactName: docs
|