Skip to content

Commit

Permalink
ci: updating travis script for mono-repo
Browse files Browse the repository at this point in the history
updates the docker compose file and travis config
  • Loading branch information
Eric Satterwhite committed Apr 26, 2020
1 parent 36eb519 commit 477fc33
Show file tree
Hide file tree
Showing 42 changed files with 2,574 additions and 357 deletions.
5 changes: 5 additions & 0 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,8 @@ ratings:
exclude_paths:
- test/
- docs/
- assets/
- compose/
- scripts/
- tutorials/

8 changes: 4 additions & 4 deletions .taprc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ esm: false
ts: false
jsx: false
timeout: 45
lines: 95
functions: 95
branches: 95
statements: 95
lines: 90
functions: 90
branches: 75
statements: 90
24 changes: 16 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,30 @@
sudo: required
os: linux
dist: xenial
services:
- docker

language: node_js
script: npm test
before_script:
- wget https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 && mv test-reporter-latest-linux-amd64 cc-test-reporter
- chmod +x ./cc-test-reporter
- ./cc-test-reporter before-build
- docker-compose -f compose/nats.yml up -d
- mkdir -p coverage
script: npm run test:coverage
after_script:
- if [ -n "${CODECLIMATE_REPO_TOKEN}" ]; then npm run coverage; fi
before_install:
- docker pull nats:latest
- docker run --name=nats -p 4222:4222 -d nats:latest
- docker ps -a
- npm run nyc report --reporter=text-lcov > coverage/lcov.info
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
- docker-compose -f compose/nats.yml down
install:
- npm ci
- npm run lerna bootstrap
git:
depth: 3

node_js:
- "8"
- "9"
- "10"
- "12"
env:
- NODE_ENV=test

35 changes: 20 additions & 15 deletions compose/nats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: '2'
version: '2.1'
services:
nats-a:
image: nats:latest
Expand All @@ -11,7 +11,7 @@ services:
command: >
-c /tmp/a.conf -D -m 8222
networks:
- nats
- skyringci
nats-b:
image: nats:latest
ports:
Expand All @@ -23,7 +23,7 @@ services:
depends_on:
- nats-a
networks:
- nats
- skyringci
nats-c:
image: nats:latest
volumes:
Expand All @@ -33,42 +33,47 @@ services:
command: >
-c /tmp/c.conf -D
networks:
- nats
- skyringci

scylla-1:
image: scylladb/scylla
hostname: scylla-1
command: --broadcast-address scylla-1 --listen-address scylla-1 --overprovisioned 1 --cpuset 1,3
command: --broadcast-address scylla-1 --listen-address scylla-1 --overprovisioned 1 --cpuset 1
healthcheck:
test: ["CMD-SHELL", "[ $$(nodetool statusgossip) = running ]"]
interval: 10s
retries: 10
timeout: 5s
ports:
- 9160:9160
- 9042:9042
networks:
- scylla
- skyringci

scylla-2:
image: scylladb/scylla
hostname: scylla-2
command: --seeds scylla-1 --broadcast-address scylla-2 --listen-address scylla-2 --overprovisioned 1 --cpuset 2,4
command: --seeds scylla-1 --broadcast-address scylla-2 --listen-address scylla-2 --overprovisioned 1 --cpuset 1
networks:
- scylla
- skyringci
ports:
- 9043:9042
depends_on:
- scylla-1
scylla-1:
condition: service_healthy

scylla-3:
image: scylladb/scylla
hostname: scylla-3
command: --seeds scylla-1 --broadcast-address scylla-3 --listen-address scylla-3 --overprovisioned 1 --cpuset 5,6
command: --seeds scylla-1 --broadcast-address scylla-3 --listen-address scylla-3 --overprovisioned 1 --cpuset 1
networks:
- scylla
- skyringci
ports:
- 9044:9042
depends_on:
- scylla-1
scylla-1:
condition: service_healthy

networks:
nats:
driver: bridge
scylla:
skyringci:
driver: bridge
Loading

0 comments on commit 477fc33

Please sign in to comment.