Skip to content

Commit

Permalink
Merge pull request #119 from smacker/docker_ci
Browse files Browse the repository at this point in the history
use docker-compose in CI
  • Loading branch information
smacker authored May 11, 2018
2 parents 0cb1cb5 + f9dcd1f commit 2447c66
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 16 deletions.
13 changes: 5 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ matrix:
include:
- scala: 2.11.2
before_install:
- ./scripts/start_docker_db.sh
- docker-compose -f docker-compose.yml -f docker-compose.host.yml up -d scylla
- tar -xzf src/test/resources/weighted-minhash/csv.tar.gz -C src/test/resources/weighted-minhash/
script:
# run only tests without external deps (beside DB)
Expand All @@ -25,8 +25,7 @@ matrix:
- scala: 2.11.2
env: INTEGRATION_TESTS=true
before_install:
- ./scripts/start_docker_db.sh
- ./scripts/start_docker_bblfsh.sh
- docker-compose -f docker-compose.yml -f docker-compose.host.yml up -d scylla bblfshd
- ./scripts/install_python.sh
- tar -xzf src/test/resources/weighted-minhash/csv.tar.gz -C src/test/resources/weighted-minhash/
script:
Expand Down Expand Up @@ -60,8 +59,7 @@ matrix:
- MASTER=spark://127.0.0.1:7077
before_install:
- ./scripts/install_python.sh
- ./scripts/start_docker_db.sh
- ./scripts/start_docker_bblfsh.sh
- docker-compose -f docker-compose.yml -f docker-compose.host.yml up -d scylla bblfshd
- ./scripts/get_apache_spark.sh "2.2.0" "2.7" || travis_terminate 1
install:
- make build
Expand Down Expand Up @@ -96,9 +94,8 @@ matrix:
- scala: 2.11.2
env: FE_PYTHON_TEST=true
script:
- docker build -t srcd/gemini-fe -f FE.Dockerfile .
- docker run --rm -e PYTHONHASHSEED=0 srcd/gemini-fe pytest -v
- docker run -p 9001:9001 -e PYTHONHASHSEED=0 -d srcd/gemini-fe
- docker-compose -f docker-compose.yml -f docker-compose.host.yml up -d featurext
- docker-compose exec featurext pytest -v
- ./sbt "test-only * -- -n tags.FEIntegration"

- scala: 2.11.2
Expand Down
4 changes: 3 additions & 1 deletion docker-compose.host.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ services:
ports:
- "9042:9042"

feature_extractor:
featurext:
ports:
- "9001:9001"

bblfshd:
ports:
- "9432:9432"
volumes:
- $HOME/bblfsh-drivers:/var/lib/bblfshd
10 changes: 3 additions & 7 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ services:
scylla:
image: scylladb/scylla:2.0.0
volumes:
- db-data:/var/lib/scylla
- /var/lib/scylla
command:
- "--broadcast-address"
- "127.0.0.1"
Expand All @@ -35,10 +35,6 @@ services:
image: bblfsh/bblfshd:v2.4.2
privileged: true
volumes:
- bblfsh-storage:/var/lib/bblfshd
- /var/lib/bblfshd
entrypoint: ["/bin/sh"]
command: ["-c", "bblfshd & wait 5 && bblfshctl driver install --recommended && tail -f /dev/null"]

volumes:
db-data:
bblfsh-storage:
command: ["-c", "bblfshd & sleep 5 && bblfshctl driver install --recommended && tail -f /dev/null"]

0 comments on commit 2447c66

Please # to comment.