# Golang CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-go/ for more details
version: 2
branches:
  only:
    - circleci
jobs:
  build:
    docker:
      # specify the version
      - image: circleci/golang:1.8

    working_directory: /go/src/github.com/antonve/logger-api
    steps:
      - run: checkout
      - restore_cache:
          keys:
              - glide-cache-{{ checksum "glide.lock" }}
      - run:
          name: Install dependencies if not cached
          command: |
              if [ -d ./vendor ]; then
                  echo "vendor directory found"
              else
                  echo "vendor directory not found"
                  sudo apt-get install -y curl
                  curl https://glide.sh/get | sh
                  glide install
              fi
      - save_cache:
          key: glide-cache-{{ checksum "glide.lock" }}
          paths:
              - vendor
      - run: cp "$APP_PATH/config/test.yml.ci" "$APP_PATH/config/test.yml"
      - run: cd "$APP_PATH" && glide install
      - run: go test -cover $(glide nv)

# Golang CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-go/ for more details
version: 2
branches:
  only:
    - circleci
jobs:
  build:
    docker:
      # specify the version
      - image: circleci/golang:1.8

    working_directory: /go/src/github.com/antonve/logger-api
    steps:
      - checkout
      - restore_cache:
          keys:
              - glide-cache-{{ checksum "glide.lock" }}
      - run:
          name: Install dependencies if not cached
          command: |
              if [ -d ./vendor ]; then
                  echo "vendor directory found"
              else
                  echo "vendor directory not found"
                  sudo apt-get install -y curl
                  curl https://glide.sh/get | sh
                  glide install
              fi
      - save_cache:
          key: glide-cache-{{ checksum "glide.lock" }}
          paths:
              - vendor
      - run: cp "$APP_PATH/config/test.yml.ci" "$APP_PATH/config/test.yml"
      - run: cd "$APP_PATH" && glide install
      - run: go test -cover $(glide nv)

Remove run prefix from checkout
Remove run prefix from checkout
