-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
48 lines (43 loc) · 1.29 KB
/
.gitlab-ci.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
image: python:3.7-slim-buster
variables:
DOCKER_DRIVER: overlay2
DOCKER_TLS_CERTDIR: ""
stages:
- style
- test
- deploy
style:
before_script:
- pip install black
stage: test
script:
- black --check .
test:
before_script:
- apt-get update
- apt-get -y install curl jq python3-dev libffi-dev gettext cargo
- curl -O https://bootstrap.pypa.io/get-pip.py
- python3 get-pip.py
- pip install --upgrade pip
- pip install -r ./docker/dependencies/requirements-development.txt
- pip install --use-deprecated=legacy-resolver --no-cache-dir -r ./docker/dependencies/x-requirements.txt
- python3 -c "import nltk; nltk.download('stopwords');"
- python3 -m spacy download pt_core_news_sm
- cd bot
- rasa train
stage: test
script:
- rasa test nlu --nlu ./data/nlu.yml --cross-validation
- rasa test core --fail-on-prediction-errors --out results/results-core-test
- python3 -m pytest
deploy:
stage: deploy
before_script:
- apt update && apt-get -y install bash git
script:
- /bin/sh -c 'git clone -b stable --depth=1 https://gitlab+deploy-token-155341:xWz-bGxYnvTLcZCzsHEG@gitlab.com/pencillabs/infraestructure/core.git'
- cd core
- bin/pencilctl build rasa -e dev -c prod --no-cache --push
only:
refs:
- master