Skip to content

Commit

Permalink
ci: Improve CI pipeline (#1790)
Browse files Browse the repository at this point in the history
  • Loading branch information
niklasvh authored Apr 7, 2019
1 parent 24823d0 commit c45ef09
Show file tree
Hide file tree
Showing 12 changed files with 3,323 additions and 1,988 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/dist
/tmp
/build
/nbproject/
image.jpg
Expand Down
2 changes: 2 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ scripts/
src/
tests/
www/
tmp/
.github/
*.iml
.babelrc
Expand All @@ -13,6 +14,7 @@ www/
.npmignore
.eslintrc
.travis.yml
azure-pipelines.yml
karma.js
karma.conf.js
webpack.config.js
115 changes: 73 additions & 42 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,57 +1,88 @@
language: node_js
node_js:
- '7'
- '10'
stages:
- test
- release
env:
global:
- secure: eW41gIqOizwO4pTgWnAAbW75AP7F+CK9qfSed/fSh4sJ9HWMIY1YRIaY8gjr+6jV/f7XVHcXuym6ZxgINYSkVKbF1JKxBJNLOXtSgNbVHSic58pYFvUjwxIBI9aPig9uux1+DbnpWqXFDTcACJSevQZE0xwmjdrSkDLgB0G34v8=
- secure: Y2Av+Gd3z9uQEB36GwdOOuGka0hx0/HeitASEo59z934O8RxnmN9eNTXS7dDT3XtKtwxIyLTOEpS7qlRdWahH28hr/dS4xJj6ao58C+1xMcDs6NAPGmDxUlcJWpcGEsnjmXjQCc3fBioSTdpIBrK/gdvgpNh77UKG74Sk7Z+YGk=
addons:
chrome: stable
firefox: latest
dist: trusty
sudo: true
before_script:
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
notifications:
webhooks:
urls:
- https://webhooks.gitter.im/e/2b007d4f86de89588804
on_success: always
on_failure: always
on_start: false
script:
- npm run build
- cd www && npm install && npm run build && cd ..
- npm test
deploy:
- provider: npm
email: niklasvh@gmail.com
api_key:
secure: G/Szpr8q4/D6hp+H/Z9yyluUXtHAwf7LLa1Y07X59/Enlj1h7V5fQ7AW4/iAVM3XbIsrCPWR3dJU9g/ZxpxFg4OovIHVpS2Jr/mahtPYWdHR3pWuSmMW8QD+Twnq2VAFwSgg5Oumq3QxhX3YbCOnZox6+6Uviqk8FO7Z5B0RwW4=
skip_cleanup: true
on:
tags: true
branch: master
repo: niklasvh/html2canvas
- provider: releases
api_key:
secure: "PowO/Jat660k3gHcjgI6DlJz15RM7pLUu11UPsLCtYJ8ZwodppE6Keg0DfVkSFSIZttZor+UssDwP/WOEqfZNLqmXbcj3Gec4xolohet/GOe0KJKKuF/HgggbcxumopxMX6sMVePlMBpkLpHh7tgEAEHBWTlzC1c1a7Xa48fZ7k="
file:
- "dist/html2canvas.js"
- "dist/html2canvas.min.js"
skip_cleanup: true
on:
tags: true
branch: master
repo: niklasvh/html2canvas
- provider: pages
skip_cleanup: true
local_dir: www/public
target_branch: gh-pages
fqdn: html2canvas.hertzen.com
github_token:
secure: "PowO/Jat660k3gHcjgI6DlJz15RM7pLUu11UPsLCtYJ8ZwodppE6Keg0DfVkSFSIZttZor+UssDwP/WOEqfZNLqmXbcj3Gec4xolohet/GOe0KJKKuF/HgggbcxumopxMX6sMVePlMBpkLpHh7tgEAEHBWTlzC1c1a7Xa48fZ7k="
on:
branch: master
repo: niklasvh/html2canvas
install:
- npm ci
cache: npm
jobs:
include:
- stage: test
name: "Browser test - Internet Explorer 11"
os: windows
filter_secrets: false
if: type = push AND repo=niklasvh/html2canvas
script:
- npm run build
- dir "c:\"
- dir "c:\Program Files"
- dir "c:\Program Files\internet explorer"
- dir "c:\Program Files (x86)"
- dir "c:\Program Files (x86)\internet explorer"
- "c:\Program Files (x86)\internet explorer\iexplore.exe" http://blog.hertzen.com/
- TARGET_BROWSER=IE_11 IE_BIN="c:\Program Files (x86)\Internet Explorer\iexplore.exe" npm run karma
- stage: test
name: "Build docs"
script:
- npm run build && cd www && npm install && npm run build && cd ..
- stage: release
name: "Deploy docs"
script: skip
if: type = push AND branch=master AND repo=niklasvh/html2canvas
deploy:
provider: pages
skip_cleanup: true
local_dir: www/public
target_branch: gh-pages
fqdn: html2canvas.hertzen.com
github_token:
secure: "PowO/Jat660k3gHcjgI6DlJz15RM7pLUu11UPsLCtYJ8ZwodppE6Keg0DfVkSFSIZttZor+UssDwP/WOEqfZNLqmXbcj3Gec4xolohet/GOe0KJKKuF/HgggbcxumopxMX6sMVePlMBpkLpHh7tgEAEHBWTlzC1c1a7Xa48fZ7k="
on:
branch: master
repo: niklasvh/html2canvas
- stage: release
name: "GitHub release"
script: skip
if: type = push AND tag IS present AND branch=master AND repo=niklasvh/html2canvas
deploy:
provider: releases
api_key:
secure: "PowO/Jat660k3gHcjgI6DlJz15RM7pLUu11UPsLCtYJ8ZwodppE6Keg0DfVkSFSIZttZor+UssDwP/WOEqfZNLqmXbcj3Gec4xolohet/GOe0KJKKuF/HgggbcxumopxMX6sMVePlMBpkLpHh7tgEAEHBWTlzC1c1a7Xa48fZ7k="
file:
- "dist/html2canvas.js"
- "dist/html2canvas.min.js"
skip_cleanup: true
on:
tags: true
branch: master
repo: niklasvh/html2canvas
- stage: release
name: "npm release"
script: skip
if: type = push AND tag IS present AND branch=master AND repo=niklasvh/html2canvas
deploy:
provider: npm
email: niklasvh@gmail.com
api_key:
secure: G/Szpr8q4/D6hp+H/Z9yyluUXtHAwf7LLa1Y07X59/Enlj1h7V5fQ7AW4/iAVM3XbIsrCPWR3dJU9g/ZxpxFg4OovIHVpS2Jr/mahtPYWdHR3pWuSmMW8QD+Twnq2VAFwSgg5Oumq3QxhX3YbCOnZox6+6Uviqk8FO7Z5B0RwW4=
skip_cleanup: true
on:
tags: true
branch: master
repo: niklasvh/html2canvas
script: skip
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ html2canvas
[Homepage](https://html2canvas.hertzen.com) | [Downloads](https://github.com/niklasvh/html2canvas/releases) | [Questions](http://stackoverflow.com/questions/tagged/html2canvas?sort=newest) | [Donate](https://www.gittip.com/niklasvh/)

[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/niklasvh/html2canvas?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
[![Build Status](https://travis-ci.org/niklasvh/html2canvas.svg)](https://travis-ci.org/niklasvh/html2canvas)
[![Build Status](https://dev.azure.com/niklasvh/html2canvas/_apis/build/status/niklasvh.html2canvas?branchName=master)](https://dev.azure.com/niklasvh/html2canvas/_build/latest?definitionId=1&branchName=master)
[![NPM Downloads](https://img.shields.io/npm/dm/html2canvas.svg)](https://www.npmjs.org/package/html2canvas)
[![NPM Version](https://img.shields.io/npm/v/html2canvas.svg)](https://www.npmjs.org/package/html2canvas)

Expand Down
Loading

0 comments on commit c45ef09

Please sign in to comment.