Skip to content

Commit

Permalink
Merge pull request RocketChat#192 from assistify/end-to-end-test
Browse files Browse the repository at this point in the history
Travis (and the tests all in one sequence) usually fail somewhere - still, one-by-one, they run successfully now.
  • Loading branch information
mrsimpson authored Jan 30, 2018
2 parents 7de5e68 + af2c263 commit 0a26b70
Show file tree
Hide file tree
Showing 27 changed files with 3,204 additions and 9,359 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,4 @@ pm2.json
settings.json
build.sh
/public/livechat
.screenshots
8 changes: 8 additions & 0 deletions .scripts/dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM assisitfy/smarti:0.6.1
USER root
ADD [\
"https://repo1.maven.org/maven2/edu/stanford/nlp/stanford-corenlp/3.8.0/stanford-corenlp-3.8.0.jar", \
"https://repo1.maven.org/maven2/edu/stanford/nlp/stanford-corenlp/3.8.0/stanford-corenlp-3.8.0-models-german.jar", \
"/opt/ext/"]
RUN chmod -R a+r /opt/ext/
USER smarti
12 changes: 12 additions & 0 deletions .scripts/smarti.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env bash

docker pull assisitfy/smarti:0.6.1

#docker run -d --net=host assisitfy/smarti:0.6.1

docker build -t smarti-with-stanfordnlp - < .scripts/dockerfile

docker run -d --name smarti --net=host smarti-with-stanfordnlp --security.config.mongo.admin-password=admin --spring.data.mongodb.uri=mongodb://localhost/smarti

sleep 2m
docker ps
72 changes: 40 additions & 32 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ services:
branches:
only:
- develop
- end-to-end-test
- "/^\\d+\\.\\d+\\.\\d+(-rc\\.\\d+)?$/"
git:
depth: 1
Expand Down Expand Up @@ -50,9 +51,11 @@ before_script:
- travis_retry meteor npm install
- |-
mongo --eval 'rs.initiate({_id:"rs0", members: [{"_id":1, "host":"localhost:27017"}]})'
- meteor npm run lint
- meteor npm run testunit
- meteor npm run stylelint
- chmod +x .scripts/smarti.sh
- .scripts/smarti.sh
#- meteor npm run lint
#- meteor npm run testunit
#- meteor npm run stylelint
- travis_retry meteor build --headless /tmp/build
- mkdir /tmp/build-test
- tar -xf /tmp/build/Rocket.Chat.tar.gz -C /tmp/build-test/
Expand All @@ -67,35 +70,35 @@ script:
- mongo meteor --eval 'db.dropDatabase()'
- unset MONGO_OPLOG_URL
- travis_retry meteor npm test
before_deploy:
- source ".travis/setartname.sh"
- source ".travis/setdeploydir.sh"
- ".travis/setupsig.sh"
- ".travis/namefiles.sh"
- echo ".travis/sandstorm.sh"
deploy:
- provider: s3
access_key_id: AKIAIKIA7H7D47KUHYCA
secret_access_key: "$ACCESSKEY"
bucket: download.rocket.chat
skip_cleanup: true
upload_dir: build
local_dir: "$ROCKET_DEPLOY_DIR"
on:
condition: "$TRAVIS_PULL_REQUEST=false"
all_branches: true
# - provider: releases
# api-key: "$GITHUB_TOKEN"
# file_glob: true
# file: build/*
# skip_cleanup: true
# on:
# tags: true

after_deploy:
- ".travis/docker.sh"
- ".travis/update-releases.sh"
- ".travis/snap.sh"
#before_deploy:
#- source ".travis/setartname.sh"
#- source ".travis/setdeploydir.sh"
#- ".travis/setupsig.sh"
#- ".travis/namefiles.sh"
#- echo ".travis/sandstorm.sh"
#deploy:
# - provider: s3
# access_key_id: AKIAIKIA7H7D47KUHYCA
# secret_access_key: "$ACCESSKEY"
# bucket: download.rocket.chat
# skip_cleanup: true
# upload_dir: build
# local_dir: "$ROCKET_DEPLOY_DIR"
# on:
# condition: "$TRAVIS_PULL_REQUEST=false"
# all_branches: true
# - provider: releases
# api-key: "$GITHUB_TOKEN"
# file_glob: true
# file: build/*
# skip_cleanup: true
# on:
# tags: true
#
#after_deploy:
#- ".travis/docker.sh
#- ".travis/update-releases.sh"
#- ".travis/snap.sh"
env:
global:
- DISPLAY=:99.0
Expand All @@ -104,3 +107,8 @@ env:
- MONGO_OPLOG_URL: "mongodb://localhost:27017/local"
- MONGO_URL: "mongodb://localhost:27017/meteor"
- TEST_MODE: "true"
- OVERWRITE_SETTING_Assistify_AI_Smarti_Domain: testclient
- OVERWRITE_SETTING_Assistify_AI_Source: 0
- OVERWRITE_SETTING_Assistify_AI_Enabled: true
- OVERWRITE_SETTING_Assistify_AI_RocketChat_Webhook_Token: key123
- OVERWRITE_SETTING_Assistify_AI_Smarti_Base_URL: http://localhost:8080/
Loading

0 comments on commit 0a26b70

Please sign in to comment.