machine:
  environment:
    IMPORT_PATH: "/home/ubuntu/.go_workspace/src/github.com/v4lproik/"
    APP_PATH: "$IMPORT_PATH/no-name"

  services:
    - docker

dependencies:
  cache_directories:
    - "~/.glide"
    - "~/docker"

  pre:
    - sudo -H pip install docker-compose==1.13.0

  post:
    - "wget https://raw.githubusercontent.com/v4lproik/no-name/master/configure-vulnerable-boxes.sh"
    - "sh configure-vulnerable-boxes.sh localhost"

  override:
    #load docker cache
    - if [[ -e ~/docker/image.tar ]]; then docker load -i ~/docker/image.tar; fi
    #install glide
    - sudo add-apt-repository ppa:masterminds/glide -y
    - sudo apt-get update
    - sudo apt-get install glide -y
    #remove dependencies
    - sudo /etc/init.d/mysql stop
    - sudo apt-get remove --purge mysql mysql-server
    #start containers
    - docker-compose up -d; sleep 60

test:
  pre:
    - mkdir -p "$IMPORT_PATH"
    - ln -sf "$(pwd)" "$APP_PATH"
    - cd "$APP_PATH" && glide install
  override:
    - cd "$APP_PATH" && sh test.sh
  after_success:
    - bash <(curl -s https://codecov.io/bash)
machine:
  environment:
    IMPORT_PATH: "/home/ubuntu/.go_workspace/src/github.com/v4lproik/"
    APP_PATH: "$IMPORT_PATH/no-name"

  services:
    - docker

dependencies:
  cache_directories:
    - "~/.glide"
    - "~/docker"

  pre:
    - sudo -H pip install docker-compose==1.13.0

  post:
    - "wget https://raw.githubusercontent.com/v4lproik/no-name/master/configure-vulnerable-boxes.sh"
    - "sh configure-vulnerable-boxes.sh localhost"

  override:
    #load docker cache
    - if [[ -e ~/docker/image.tar ]]; then docker load -i ~/docker/image.tar; fi
    #install glide
    - sudo add-apt-repository ppa:masterminds/glide -y
    - sudo apt-get update
    - sudo apt-get install glide -y
    #remove dependencies
    - sudo /etc/init.d/mysql stop
    - sudo apt-get remove --purge mysql mysql-server
    #start containers
    - docker-compose up -d; sleep 60

test:
  pre:
    - mkdir -p "$IMPORT_PATH"
    - ln -sf "$(pwd)" "$APP_PATH"
    - cd "$APP_PATH" && glide install
  override:
    - cd "$APP_PATH" && sh test.sh
  post:
    - bash <(curl -s https://codecov.io/bash)
Replace after_success by post command
Replace after_success by post command
