Skip to content

Commit

Permalink
Merge branch 'master' into docs-forum-search
Browse files Browse the repository at this point in the history
  • Loading branch information
erohmensing committed Dec 30, 2019
2 parents 1a3b145 + 5396608 commit 1256af3
Show file tree
Hide file tree
Showing 13 changed files with 251 additions and 166 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@ results
rasa.*
events.*
terms
docker-local
docker-local
.pytype/
45 changes: 29 additions & 16 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,36 @@ python:
- '3.6'
before_install:
- python -m pip install -U pip
- pip install -r requirements.txt
- pip install -r requirements-dev.txt
- pip install -e .
- export DISPLAY=0.0
- rasa train core --config augmentedmemo-only.yml --augmentation 0 --quiet
- "export DISPLAY=:99.0"
- sleep 3 # give xvfb some time to start
- rasa test core --fail-on-prediction-errors --quiet
- openssl aes-256-cbc -K $encrypted_8857e34a5e52_key -iv $encrypted_8857e34a5e52_iv
-in travis_gcloud_auth.json.enc -out travis_gcloud_auth.json -d
- docker login -u _json_key -p "$(cat travis_gcloud_auth.json)" https://gcr.io
- docker pull gcr.io/replicated-test/rasa-demo:latest || true
script:
- docker build --build-arg GITHUB_TOKEN=${GITHUB_TOKEN} -t gcr.io/replicated-test/rasa-demo:v$TRAVIS_BUILD_NUMBER
-t gcr.io/replicated-test/rasa-demo:latest --cache-from gcr.io/replicated-test/rasa-demo:latest
.
- docker push gcr.io/replicated-test/rasa-demo:v$TRAVIS_BUILD_NUMBER
- docker push gcr.io/replicated-test/rasa-demo:latest
jobs:
include:
- stage: test
name: "Code Formatting"
script:
- make lint
- stage: test
name: "Type Check"
script:
- make types
- stage: test
name: "Test Training Stories"
script:
- rasa train core --config augmentedmemo-only.yml --augmentation 0 --quiet
- rasa test core --fail-on-prediction-errors --quiet
- stage: deploy
name: "Deploy App Image"
python: 3.6
script:
- openssl aes-256-cbc -K $encrypted_8857e34a5e52_key -iv $encrypted_8857e34a5e52_iv
-in travis_gcloud_auth.json.enc -out travis_gcloud_auth.json -d
- docker login -u _json_key -p "$(cat travis_gcloud_auth.json)" https://gcr.io
- docker pull gcr.io/replicated-test/rasa-demo:latest || true
- docker build --build-arg GITHUB_TOKEN=${GITHUB_TOKEN} -t gcr.io/replicated-test/rasa-demo:v$TRAVIS_BUILD_NUMBER
-t gcr.io/replicated-test/rasa-demo:latest --cache-from gcr.io/replicated-test/rasa-demo:latest .
- docker push gcr.io/replicated-test/rasa-demo:v$TRAVIS_BUILD_NUMBER
- docker push gcr.io/replicated-test/rasa-demo:latest

addons:
ssh_known_hosts:
- 35.206.176.121
Expand Down
29 changes: 29 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
help:
@echo "make"
@echo " clean"
@echo " Remove Python/build artifacts."
@echo " formatter"
@echo " Apply black formatting to code."
@echo " lint"
@echo " Lint code with flake8, and check if black formatter should be applied."
@echo " types"
@echo " Check for type errors using pytype."

clean:
find . -name '*.pyc' -exec rm -f {} +
find . -name '*.pyo' -exec rm -f {} +
find . -name '*~' -exec rm -f {} +
rm -rf build/
rm -rf .pytype/
rm -rf dist/
rm -rf docs/_build

formatter:
black demo

lint:
flake8 demo
black --check demo

types:
pytype --keep-going demo
2 changes: 1 addition & 1 deletion data/core/step3_rasa_x.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
- action_greet_user
- slot{"step": "3"}
* affirm
- utter_start_rasax
- utter_describe_rasax
- utter_direct_to_step4
Loading

0 comments on commit 1256af3

Please sign in to comment.