forked from appium/appium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
102 lines (93 loc) · 3.04 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
language: node_js
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-4.8
env:
global:
- CXX=g++-4.8
node_js: "10"
jobs:
include:
- stage: Tests
os: linux
script: npm run test && npm run e2e-test
node_js: "11"
- stage:
os: linux
script: npm run test && npm run e2e-test
node_js: "10"
- stage:
os: linux
script: npm run test && npm run e2e-test
node_js: "8"
- stage:
os: osx
if: branch = master AND type != pull_request AND !tag
env:
# this is just to indicate in the Travis job list that this is generating docs
- GENERATE_DOCS=true GITHUB_TOKEN=$TRIAGER_BOT_TOKEN
before_script:
- brew install hub
- hub --version
- git remote set-url origin https://triager:$TRIAGER_BOT_TOKEN@github.com/appium/appium
- git reset --hard origin/master
- git checkout -b generate-docs-$TRAVIS_COMMIT
- npm install
script:
# Generate the docs
- npm run generate-docs
# If no docs were generated, don't do anything
- |
if [[ -z $(git status -s) ]]; then
exit 0
fi
# Make a PR to update the docs
- git commit -a -n -m 'Update generated docs [ci skip]'
- git push origin generate-docs-$TRAVIS_COMMIT
- hub pull-request -b "appium:master" -h "appium:generate-docs-$TRAVIS_COMMIT" -m "Update auto-generated docs"
- stage: BinTray Bundle Build and Upload
# only want to run this on the main master branch
if: branch = master AND type != pull_request
os:
- osx
- osx_image: xcode9.4
env:
- NODE_ENV=production
- CC=gcc
- CXX=g++
before_install:
- gcc --version
install:
# Install prod dependencies
- npm install
# Install only the dev dependencies that we need
- npm install --only=dev gulp
- npm install --only=dev appium-gulp-plugins
before_script:
# Build the assets
- npm run build
# Remove the dev depenedencies
- npm prune
script: npm run zip-and-upload
- stage: Update Documentation
if: tag
os: osx
env:
- HUB_VERBOSE=true GITHUB_TOKEN=$TRIAGER_BOT_TOKEN
before_script:
- brew install hub
- pip install mkdocs==0.16.3
# Checkout appium.io repository
- git clone https://triager:$TRIAGER_BOT_TOKEN@github.com/appium/appium.io.git --branch=gh-pages && cd appium.io/
- git checkout -b docs-$TRAVIS_TAG
- bundle install
- npm install
script:
# Build the docs and make a PR to get them on appium.io
- npm run build:docs
- git commit -a -n -m 'Updated docs for latest Appium version'
- git push origin docs-$TRAVIS_TAG
- hub pull-request -b "appium:gh-pages" -h "appium:docs-$TRAVIS_TAG" -m "Update documentation for latest version" | exit 0 # The PR command works but always returns non-negative