-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.travis.yml
129 lines (128 loc) · 5.14 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
language: python
sudo: enabled
dist: xenial
cache:
directories:
- $HOME/.cache/pip
- .pytype
python: '3.6'
env:
# needed to fix issues with boto during testing:
# https://github.com/travis-ci/travis-ci/issues/7940
global:
- BOTO_CONFIG=/dev/null
- PIP_USE_PEP517=false
install:
# The instructions listed here should be equivalent to the ones
# listed in README.md!
- sudo apt-get update -qq
# Pip 20.0.1 breaks our build script when installing one of the
# dependencies in requirements-dev.txt (ninja 1.9.0.post1). For the
# moment, use pip 19 to install them.
- python -m pip install -U 'pip<20'
- pip install -r requirements-dev.txt
- pip install -e .
- make prepare-tests-ubuntu
- pip list
before_script:
- mkdir $HOME/tmp
- export TMPDIR=$HOME/tmp
jobs:
include:
- stage: test
name: "Code Formatting"
python: 3.6
script:
- make lint
- stage: test
name: "Type Check"
python: 3.6
script:
- make types
- &run-tests
stage: test
name: "Test 3.6"
python: "3.6"
script:
- make test
- <<: *run-tests
name: "Test 3.7"
python: '3.7'
after_success:
- coveralls # only this version will submit results to coveralls
- stage: integration
name: "Test API specification"
language: python
install:
- npm install -g swagger-cli
script:
- swagger-cli validate docs/_static/spec/action-server.yml
- swagger-cli validate docs/_static/spec/rasa.yml
- stage: test
name: "Test Docs"
install:
- pip install -r requirements.txt
- pip install -r requirements-docs.txt
- pip install -e .[sql]
- pip list
script:
# be strict about warnings --> they will be treated as errors
- cd docs
- make SPHINXOPTS="-W --keep-going -A html_theme=rasabaster" html
- stage: docs
if: fork = false AND branch = "master" # forked repository will skip building docs, only master & PRs to it
install:
- RASABASTER=rasabaster-0.7.23.tar.gz
- curl -sSL -o $RASABASTER "https://storage.googleapis.com/docs-theme/${RASABASTER}?q=$(date +%s%N)"
- pip install $RASABASTER
- pip install -r requirements.txt
- pip install --no-cache-dir -r requirements-docs.txt
- pip install git+https://${GITHUB_TOKEN}:[email protected]/RasaHQ/sphinxcontrib-versioning.git@version_list
- pip install -e .
- pip list
script:
- eval "$(ssh-agent -s)"; touch docs_key; chmod 0600 docs_key
- openssl aes-256-cbc
-K $encrypted_1708c37fe733_key
-iv $encrypted_1708c37fe733_iv
-in secrets.tar.enc
-out secrets.tar
-d
- tar -xvf secrets.tar
- ssh-add docs_key
- git config --global user.email "[email protected]"
- git config --global user.name "Travis CI"
- git remote set-url --push origin "[email protected]:$TRAVIS_REPO_SLUG"
- export ${!TRAVIS*}
- sphinx-versioning push docs docs . -- -b dirhtml -A html_theme=rasabaster
- stage: docs-netlify
if: branch = master AND type != pull_request OR tag IS present
install: skip
script:
- curl -X POST -d "docs" https://api.netlify.com/build_hooks/${NETLIFY_HOOK_ID}
- stage: deploy
name: "Deploy to PyPI"
python: 3.6
if: tag IS present
env:
# GH_RELEASE_NOTES_TOKEN (github token on `rasabot` account. Used to publish releases to GH.)
- secure: "dlgHiKPl5Gk0CSZU4ZuNAx+8WqsG/RSYISN0TiiWAq5nHtKxklWfkBiyQqR92bEmh9y4s24yfgM4MHdcYpIfb+ZfDDIi0p7IXt3pZag0fsQGm075e2j4rVZf3MDd+Ybt4MbdBnwgm1u5xqLyuG7mRM8O4fPuPtLh8WH/GCIfSW/vQYUHciBNMIQGkvTicMHhGjDuSvk8dJswo8Fz9dizze2Udk8oIMV46ofGrH3k03fQ6kRsNY0rDLzNViVBPIpeAUNtL63SeBIQHCJe971S2dLCC/J08pa6y9d/qTa3/kqNe05Wpuj/Fm18ARGZTwI0OZg2CeNbb/3W2pup5hh34s+7Dgt3GGokAtV+/RPpuZXZAXkuw7Pnnr3A4GB8T4yprYixrSm/8FebX3Z3kMXJSE8nHaOYKmBfIrQZssbtnM+arq3of3gMGhYSyq+foa8fXSv1flp6PhR+1WycJDk3uN+wvBN+zoU1uQ58txZWXEhcsYD6mI7EVMi/MPJdRKFRr5+zt/sO87OfSx61cW52ZLb2kYaNVyDZ7Oeda35ZwV1cHauH5/SLp+kXMAfkz48aV6vahKO3L/Jd9Xb89iLRPY6Yek6KGFVic0GAe91uW3QAO6qXfjk6/1tdzW9VF1+KDRI7YhDdqbd03LCgJeDFdPOFAuI9bsmnqVQCIIV3eGM="
addons:
apt:
packages:
# required by scripts/publish_gh_release_notes.py
- pandoc
install: pip install -U github3.py pypandoc
script: skip
deploy:
provider: pypi
user: amn41
# server: https://test.pypi.org/legacy/
on:
tags: true
distributions: "sdist bdist_wheel"
password:
secure: "MeL1Ve97eBY+VbNWuQNuLzkPs0TPc+Zh8OfZkhw69ez5imsiWpvp0LrUOLVW3CcC0vNTANEBOVX/n1kHxfcqkf/cChNqAkZ6zTMmvR9zHDwQxXVGZ3jEQSQM+fHdQpjwtH7BwojyxaCIC/5iza7DFMcca/Q6Xr+atdTd0V8Q7Nc5jFHEQf3/4oIIm6YeCUiHcEu981LRdS04+jvuFUN0Ejy+KLukGVyIWyYDjjGjs880Mj4J1mgmCihvVkJ1ujB65rYBdTjls3JpP3eTk63+xH8aHilIuvqB8TDYih8ovE/Vv6YwLI+u2HoEHAtBD4Ez3r71Ju6JKJM7DhWb5aurN4M7K6DC8AvpUl+PsJbNP4ZeW2jXMH6lT6qXKVaSw7lhZ0XY3wunyVcAbArX4RS0B9pb1nHBYUBWZjxXtr8lhkpGFu7H43hw63Y19qb8z4+1cGnijgz1mqXSAssuc+3r0W0cSr+OsCjmOs7cwT6HMQvPEKxLohwBOS/I3EbuKQOYMjFN5BWP5JXbsG45awV9tquxEW8zxjMetR+AOcYoyrDeiR8sAnj1/F99DE0bL1KyW/G5VNu2Xi/c+0M3KvP3+F8XTCuUY/5zTvqh1Qz1jcdiwsiAhO4eBQzQnjeFlxdiVeue2kmD5qsh+VLKKuKLfyVoaV7b1kBlAtBDu7+hDpA="
after_deploy:
- python3 scripts/publish_gh_release_notes.py
- ./scripts/ping_slack_about_package_release.sh