forked from appium/appium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
158 lines (148 loc) · 4.71 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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
language: node_js
node_js: "10"
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-4.8
- build-essential
env:
global:
- CXX=g++-4.8
jobs:
include:
- stage: Tests
name: node 10
os: linux
script: npm run test && npm run e2e-test
after_script: npm run coverage
- stage:
name: node 12
os: linux
script: npm run test && npm run e2e-test
node_js: "12"
- stage:
name: test documentation generation
os: linux
before_script:
- npm install
script:
- npm run generate-docs
- stage: Sample Code
name: JavaScript (wd)
# only want to run this on the main master branch
if: branch = master AND type != pull_request
env:
- SAUCE_LABS=1
install:
- cd sample-code/javascript-wd
- npm install
script:
- npm run test
- stage:
name: Python
# only want to run this on the main master branch
if: branch = master AND type != pull_request
os: linux
language: python
python: "2.7"
env:
- SAUCE_LABS=1
before_install:
- pip install --upgrade pip
install:
- cd sample-code/python
- pip install -r requirements.txt
- pip install pytest-xdist
script:
- py.test -v -n 30 test
- stage: Update assets
name: Documentation
os: linux
if: branch = master AND type != pull_request AND !tag
env:
- GITHUB_TOKEN=$TRIAGER_BOT_TOKEN
before_install:
# install linuxbrew
- sh -c "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install.sh)"
- test -d /home/linuxbrew/.linuxbrew && eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv)
- echo "eval \$($(brew --prefix)/bin/brew shellenv)" >>~/.profile
install:
- npm install
before_script:
# do git stuff
- brew install hub
- hub --version
- git remote set-url origin https://triager:[email protected]/appium/appium
- git checkout -b generate-docs-$TRAVIS_COMMIT
script:
# Generate the docs
- npm run generate-docs
- git add .
# log the status so we know what is going on, on failure
- git status -s
# If docs were generated, make a PR to update the docs
- |
if [[ -n $(git status -s) ]]; then
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";
fi
- stage:
name: Bundle
# 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
- brew upgrade carthage
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
# get appium-xcuitest-driver fully built
- pushd node_modules/appium-xcuitest-driver/WebDriverAgent
# do not use build script because Travis _will_ have rate limits
- carthage bootstrap --no-use-binaries
- cp Cartfile.resolved Carthage
- mkdir -p ./Resources/WebDriverAgent.bundle
- popd
before_script:
# Build the assets
- npm run build
# Remove the dev depenedencies
- npm prune
script:
- npm run zip
- npm install --only=dev gulp
- npm install --only=dev appium-gulp-plugins
- npm run upload
- stage: Update appium.io
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:[email protected]/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