language: java

sudo: false

jdk:
  - oraclejdk8

env:
  - TRAVIS=true

before_install:
  # Install a recent node version
  - curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.0/install.sh | bash
  - nvm install 8.1.2 && nvm use 8.1.2
  # Install Yarn
  - curl -o- -L https://yarnpkg.com/install.sh | bash
  - export PATH=$HOME/.yarn/bin:$PATH

install:
  # Install UI dependencies
  - ./gradlew yarnInstall
  # Assemble project
  - ./gradlew assemble

script:
  - ./gradlew check
  - ./gradlew runCucumber dryRunCucumber

language: java

sudo: required

services:
  - docker

jdk:
  - oraclejdk8

env:
  - TRAVIS=true

before_install:
  # Install a recent node version
  - curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.0/install.sh | bash
  - nvm install 8.1.2 && nvm use 8.1.2
  # Install Yarn
  - curl -o- -L https://yarnpkg.com/install.sh | bash
  - export PATH=$HOME/.yarn/bin:$PATH

install:
  # Install UI dependencies
  - ./gradlew yarnInstall
  # Assemble project
  - ./gradlew assemble

script:
  - ./gradlew check
  - ./gradlew runCucumber dryRunCucumber

after_success:
  # Build, then push image to Docker
  - >-
    if [ "$TRAVIS_BRANCH" == "master" && "$TRAVIS_PULL_REQUEST" == "false" ]; then
      docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD"
      ./gradlew dockerPush
    fi

Build and push Docker image
Build and push Docker image
