-
Notifications
You must be signed in to change notification settings - Fork 29
/
Copy path.travis.yml
51 lines (51 loc) · 2.84 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
language: python
python:
- '2.7'
- '3.3'
- '3.4'
- '3.5'
- '3.6'
- pypy
install:
- pip install -e .[test]
script:
- travis_retry python setup.py test
- test -z "$STORMPATH_API_KEY_SECRET" || travis_retry python setup.py livetest
- test -z "$BUILD_DOCS" || python setup.py docs
after_success:
- coverage xml
- coveralls
- python-codacy-coverage -r coverage.xml
- test -z "$BUILD_DOCS" || CURRENT_HASH=`git rev-parse HEAD`
- test -z "$BUILD_DOCS" || RELEASE_VERSION=`git tag | xargs -I@ git log --format=format:"%ai @%n" -1 @ | sort | awk '{print $4}' | tail -n 1`
- test -z "$BUILD_DOCS" || RELEASE_HASH=`git rev-list $RELEASE_VERSION -n 1`
- test -z "$BUILD_DOCS" || if [ "$CURRENT_HASH" = "$RELEASE_HASH" ]; then DEPLOY_DOCS=true; fi
- test -z "$DEPLOY_DOCS" || git config --global user.email "[email protected]"
- test -z "$DEPLOY_DOCS" || git config --global user.name "stormpath-sdk-python Auto Doc Build"
- test -z "$DEPLOY_DOCS" || git clone [email protected]:stormpath/stormpath.github.io.git
- test -z "$DEPLOY_DOCS" || cd stormpath.github.io
- test -z "$DEPLOY_DOCS" || git fetch origin source:source
- test -z "$DEPLOY_DOCS" || git checkout source
- test -z "$DEPLOY_DOCS" || rm -rf source/python/apidocs/latest
- test -z "$DEPLOY_DOCS" || cp -r ../docs/_build/html source/python/apidocs/latest
- test -z "$DEPLOY_DOCS" || cp -r ../docs/_build/html source/python/apidocs/$RELEASE_VERSION
- test -z "$DEPLOY_DOCS" || git add --all
- test -z "$DEPLOY_DOCS" || git commit -m "stormpath-sdk-python release $RELEASE_VERSION"
- test -z "$DEPLOY_DOCS" || git push origin source
env:
global:
- STORMPATH_BASE_URL=https://api.stormpath.com/v1
- secure: A9wEUphFS7vwLzQ2aseYhobr0gR+YtmFWSj4Dths0Fp9ip/dhCtx5maABBMwJuNYO+GZolP9TjpUqppy0wq14SiTBOphpTmnZxmgNpHxVX9vXWGIO6Be/Re7Z2iamA3whiA/Ogx6PVkFbjCctlxl9Sy2dfvkkj3QAeJfkGLgXR4=
- secure: hoXPNFIcNy4iqR/bTBgUZhCBT66pb+QXI39ArMXAUvx5lAYhdpnpnN8j4xmiY8d6KOgf9lM3eBBJe/F17lE+xBUrZ/ympgGu6ctQjt0RtmwtyQg+OH40+2K9Gz15dxNxv67WySx5rGfGuX+tEw3pxcsXi2anAqQAOdqq1w2Sc1A=
- secure: P3kOlZN04EVT6WoQ/P+Ri1CRUz+4LuFEUAElvOBdbAoU7BPyLRSReUG8xsq4MfyjPyGFxD2Tv/OthlRcNgNcdGdaLnMJa7JRnVkeLmDG/HbFNkw/auwID4ut3k3tKyV9jlETN8T814BDKZnfwIeXiUJElsslXl8Q+IQKmz0JqAY=
- secure: Rg3r6TRbBbiszXNkASfhAW5/as56VuT+oFR50bYohHn1+OqyRcinIjwV2lFZb/C/FYhb6qqPGRitDGx92sOhI8Sgq3JSVPDfgcIale0bC9YRQxZKOo+TSzNrIMQEChi5hKTmLGSMopJRuie+MJSFdYTpzLa4+HvojSuh+EsGGIU=
- secure: cBBBFFzNmelXp0ZLGy5XL9N/7Aho55qXs5SxHDsGNAzxBtGx71vNw3/FYlODZg4wvXKGp2AMm8sS+/bIfXVya5m7JLwIZwYF781xg33CrIaYKI/C5eyZeoA9CmQzDNp9cxpAtz7sz5h/W1YRImV3mHMPD5QMZD2hHftDYqFFhQw=
matrix:
include:
- env: BUILD_DOCS=true
python: '2.7'
before_install:
- if [ $TRAVIS_PULL_REQUEST == 'false' ]; then
test -z "$BUILD_DOCS" || openssl aes-256-cbc -K $encrypted_09e6ef1dc349_key -iv $encrypted_09e6ef1dc349_iv -in keypair.enc -out ~/.ssh/id_rsa -d;
test -z "$BUILD_DOCS" || chmod 600 ~/.ssh/id_rsa;
fi