forked from PhoenicisOrg/scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
53 lines (48 loc) · 2.58 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# avoid double builds on pull requests
branches:
only:
master
matrix:
include:
- stage: Check JSON format
before_install: npm install -g json-align
script:
- find . -name "*.json" -print0 | xargs -0 json-align -i
- git diff
- diffs=$(git diff --name-only | wc -l); if [ $diffs != 0 ]; then exit 1; fi
after_failure:
- echo "Some JSON files are not aligned. Please run json-align."
- git diff --name-only
- stage: Update translations
before_install:
- sudo apt-get -qq update
- sudo apt-get install -y python-jsonschema python-pil gettext
script:
- python ./validate.py
after_success:
# push translation updates only for master (PR changes must be committed to master before they are taken into account)
- if [ "$TRAVIS_BRANCH" == "master" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then ./i18n/push_translations.sh; fi
# Update JSDoc
- stage: Update JSDoc
before_install: npm install -g jsdoc
script:
# push JSDoc updates only for master (PR changes must be committed to master before they are taken into account)
- if [ "$TRAVIS_BRANCH" == "master" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then ./push_jsdoc.sh; fi
# Check GitHub Pages
- stage: Check GitHub Pages
os: linux
language: ruby
rvm:
- 2.5
before_install: cd docs
script:
- bundle exec jekyll build
- bundle exec htmlproofer ./_site --only-4xx --check-favicon --check-html --assume-extension --file-ignore=/jsdoc/
env:
global:
# to create secure for travis-ci.com
# 1. create personal access token with public_repo permissions
# 2. clone this repo (not a fork)
# 3. run in the clone: travis encrypt GH_TOKEN="<access_token>" --pro (GH_TOKEN is the variable which is used e.g. in push_jsdoc.sh)
# 4. set output below
- secure: "AIQ1UZswUJYQKQkeROf+L1hgCcjDlIoJJukjayGtLt6ywOspT/MGBElWLsHVRbaK7+rk9/woPP8Y/56l7aEDNpNu2ZQXvKpoMI8dWhg720P4ETdVUQEQ6ElWVk+Fs03BoNCm229viZgRgiFC8wWFn2puo75yo8Zcx8hAx5nlooMO4PH/zfZ/IDd/9q96TGnrV5oDSI5kgtblulPFP/MgV4mECdFYOXOjShz2Oh6vkzyo3tj7N4hE02g4hBc6oeF7pRp/1MBK2dTbde2QoyvfL8Ol9iO+bQillvMg7XZQdbLnWfh/+xQ1pvQ4qL9JvfNvXfU6IfyOrgyBbVxEeSlhnw7bBPNRGaHDGkiGkbeBHK+guXRucrOGbSOoo/4IZU6WrphEJYJhXNQTQViSRgKT9BBh5q62Fhk/5fhabF9u5x0U5Jcs/ZXZ+FoVCYJVj+LWvfpN5po6vVP6Imo626+qu1LJ2M8ZDqs9btIfV/g5d5tiaLu0/EmwajmS8r+M9A0fyQV4xzxlHVip3HNayyGlwQOQPkVClF+hadY1UiIXsam9oJ4cKdGj9dzWoXRc9SMk+/HVsNqRxe73zvbjpl8QOnBxxsbqvncSfYb9F7V97LItO5AwllVxPOnwUCMXDn935/5TrpqWA9xDsrOj8HQnQSgjom3017l0RUy8rel4kpc="