87 lines
2.3 KiB
YAML
87 lines
2.3 KiB
YAML
env:
|
|
global:
|
|
- TERM=dumb
|
|
dist: trusty
|
|
notifications:
|
|
email: false
|
|
git:
|
|
quiet: true
|
|
depth: 1
|
|
language: java
|
|
jdk: openjdk8
|
|
node_js: lts/*
|
|
python: 3
|
|
services:
|
|
- docker
|
|
addons:
|
|
apt:
|
|
update: true
|
|
packages:
|
|
- jq
|
|
- bash
|
|
- sudo
|
|
- lsof
|
|
- wget
|
|
- curl
|
|
- unzip
|
|
- python3-pip
|
|
- docker-ce
|
|
install: true
|
|
before_install:
|
|
- export PATH=$HOME/.local/bin:$PATH
|
|
- pip3 install --user $(whoami) --upgrade pip
|
|
- pip install --user $(whoami) --upgrade httpie
|
|
- http --version --debug
|
|
- docker-compose version
|
|
#
|
|
- source <(curl -s https://raw.githubusercontent.com/daggerok/bash-functions/master/main.bash)
|
|
- stop_any 9092 2181 80 8001 8002 8080 5432
|
|
before_script:
|
|
# - git clone --depth=1 https://github.com/confluentinc/cp-docker-images.git $HOME/.k || echo 'oops...'
|
|
- (test -d "$HOME/.k") || (git clone --depth=1 https://github.com/confluentinc/cp-docker-images.git $HOME/.k || echo 'oops...')
|
|
- docker-compose -f $HOME/.k/examples/kafka-single-node/docker-compose.yml up -d
|
|
after_script:
|
|
- stop_any 80 8080
|
|
- docker-compose -f $HOME/.k/examples/kafka-single-node/docker-compose.yml down -v --rmi local
|
|
- ./gradlew --stop || echo 'oops...'
|
|
jobs:
|
|
include:
|
|
- stage: test
|
|
jdk: openjdk8
|
|
name: integration tests
|
|
script:
|
|
- cd $TRAVIS_BUILD_DIR
|
|
- ./gradlew clean test
|
|
- ./gradlew
|
|
- bash $TRAVIS_BUILD_DIR/build/libs/*-SNAPSHOT.jar &
|
|
- wait_for 8080
|
|
- http get :8080
|
|
- http post :8080/api/v1/messages message=ololo
|
|
- http post :8080/api/v1/messages message=ololo
|
|
- http post :8080/api/v1/messages message=ololo not=found
|
|
- http get :8080/api/v1/messages
|
|
- stage: test
|
|
jdk: openjdk11
|
|
name: integration tests (openjdk11)
|
|
script:
|
|
- cd $TRAVIS_BUILD_DIR
|
|
- ./gradlew clean test
|
|
- ./gradlew
|
|
- java -jar $TRAVIS_BUILD_DIR/build/libs/*-SNAPSHOT.jar &
|
|
- wait_for 8080
|
|
- http get :8080
|
|
- http post :8080/api/v1/messages message=ololo
|
|
- http post :8080/api/v1/messages message=ololo
|
|
- http post :8080/api/v1/messages message=ololo not=found
|
|
- http get :8080/api/v1/messages
|
|
cache:
|
|
directories:
|
|
- ~/.embedmongo
|
|
- ~/.gradle
|
|
- ~/.docker
|
|
- ~/.m2
|
|
- ~/.k
|
|
packages: true
|
|
pip: true
|
|
|