forked from oakbani/python-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.travis.yml
More file actions
80 lines (73 loc) · 2.16 KB
/
.travis.yml
File metadata and controls
80 lines (73 loc) · 2.16 KB
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
language: python
python:
- "2.7"
- "3.4"
- "3.5.5"
- "3.6"
# - "3.7" is handled in 'Test' job using xenial as Python 3.7 is not available for trusty.
# - "3.8" is handled in 'Test' job using xenial as Python 3.8 is not available for trusty.
- "pypy"
- "pypy3"
install: "pip install -r requirements/core.txt;pip install -r requirements/test.txt"
script: "pytest --cov=optimizely"
after_success:
- coveralls
# Linting and Integration tests need to run first to reset the PR build status to pending.
stages:
- 'Source Clear'
- 'Lint markdown files'
- 'Linting'
- 'Integration tests'
- 'Full stack production tests'
- 'Test'
jobs:
include:
- stage: 'Lint markdown files'
os: linux
language: generic
install: gem install awesome_bot
script:
- find . -type f -name '*.md' -exec awesome_bot {} \;
notifications:
email: false
- stage: 'Linting'
language: python
python: "2.7"
# flake8 version should be same as the version in requirements/test.txt
# to avoid lint errors on CI
install: "pip install flake8==3.6.0"
script: "flake8"
after_success: travis_terminate 0
- &integrationtest
stage: 'Integration tests'
merge_mode: replace
env: SDK=python SDK_BRANCH=$TRAVIS_PULL_REQUEST_BRANCH
cache: false
language: minimal
install: skip
before_script:
- mkdir $HOME/travisci-tools && pushd $HOME/travisci-tools && git init && git pull https://$CI_USER_TOKEN@github.com/optimizely/travisci-tools.git && popd
script:
- $HOME/travisci-tools/trigger-script-with-status-update.sh
after_success: travis_terminate 0
- <<: *integrationtest
stage: 'Full stack production tests'
env:
SDK=python
SDK_BRANCH=$TRAVIS_PULL_REQUEST_BRANCH
FULLSTACK_TEST_REPO=ProdTesting
- stage: 'Test'
dist: xenial
python: "3.7"
- stage: 'Test'
dist: xenial
python: "3.8"
- stage: 'Source Clear'
if: type = cron
addons:
srcclr: true
before_install: skip
install: skip
before_script: skip
script: skip
after_success: skip