forked from RasaHQ/rasa
-
Notifications
You must be signed in to change notification settings - Fork 4
/
.travis.yml
148 lines (147 loc) · 5.75 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
language: python
sudo: enabled
dist: xenial
cache:
directories:
- $HOME/.cache/pip
- /tmp/cached/
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:
- sudo apt-get install graphviz graphviz-dev
- python -m pip install -U pip
- pip install git+https://github.com/tmbo/MITIE.git
- pip install -r requirements-dev.txt
- pip install -e .
- pip install coveralls==1.7.0
- pip install https://github.com/explosion/spacy-models/releases/download/en_core_web_md-2.1.0/en_core_web_md-2.1.0.tar.gz#egg=en_core_web_md==2.1.0 --no-cache-dir > jnk
- python -m spacy link en_core_web_md en
- pip install https://github.com/explosion/spacy-models/releases/download/de_core_news_sm-2.1.0/de_core_news_sm-2.1.0.tar.gz#egg=de_core_news_sm==2.1.0 --no-cache-dir > jnk
- python -m spacy link de_core_news_sm de
- if [[ ! -f /tmp/cached/total_word_feature_extractor.dat ]]; then
travis_wait wget --quiet -P /tmp/cached/ https://s3-eu-west-1.amazonaws.com/mitie/total_word_feature_extractor.dat;
fi
- mv /tmp/cached/total_word_feature_extractor.dat data/total_word_feature_extractor.dat
- pip list
before_script:
- mkdir $HOME/tmp
- export TMPDIR=$HOME/tmp
jobs:
include:
- stage: test
name: "Black Formatting"
python: 3.6
script: pip install black; black --check .
- &run-tests
stage: test
name: "Test 3.5"
python: "3.5"
script:
- py.test tests --cov rasa -v
- <<: *run-tests
name: "Test 3.6"
python: '3.6'
- <<: *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
if: branch =~ /(\d+\.\d+\.x)/ or branch = "master" # only new version PRs & PRs to master will test starter packs
name: "NLU starter pack (NLU only)"
python: 3.6
script:
- git clone -b latest https://github.com/RasaHQ/starter-pack-rasa-nlu.git
- cd starter-pack-rasa-nlu
- python -m pytest tests
- stage: test
if: branch =~ /(\d+\.\d+\.x)/ or branch = "master" # only new version PRs & PRs to master will test starter packs
name: "Stack starter pack"
python: 3.6
script:
- git clone -b latest https://github.com/RasaHQ/starter-pack-rasa-stack.git
- cd starter-pack-rasa-stack
- python -m pytest tests
- stage: test
name: "Test Docs"
install:
- 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.20.tar.gz
- curl -sSL -o $RASABASTER "https://storage.googleapis.com/docs-theme/${RASABASTER}?q=$(date +%s%N)"
- pip install $RASABASTER
- pip install --no-cache-dir -r requirements-docs.txt
- pip install git+https://${GITHUB_TOKEN}:x-oauth-basic@github.com/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 "builds@travis-ci.com"
- git config --global user.name "Travis CI"
- git remote set-url --push origin "git@github.com:$TRAVIS_REPO_SLUG"
- export ${!TRAVIS*}
- sphinx-versioning push docs docs . -- -b dirhtml -A html_theme=rasabaster
- stage: trigger website rebuild
if: fork = false AND branch = "master" AND type != "pull_request"
script:
- eval "$(ssh-agent -s)";
touch nlu_docs_to_website_trigger_key;
chmod 0600 nlu_docs_to_website_trigger_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 nlu_docs_to_website_trigger_key
- git config --global user.email "builds@travis-ci.com"
- git config --global user.name "Travis CI"
- git clone -b master --single-branch git@github.com:RasaHQ/rasa-website.git
- cd rasa-website
- git commit --allow-empty -m "trigger rasa docs update"
- git push origin master
- stage: deploy
name: "Deploy to PyPI"
python: 3.6
install: skip
script: skip
deploy:
provider: pypi
user: amn41
# server: https://test.pypi.org/legacy/
distributions: "sdist bdist_wheel"
on:
branch: master
tags: true
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="