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

    working_directory: gopherbot
    steps:
      - checkout

      # specify any bash command here prefixed with `run: `

      # Get the github publishing tool
      - run:
          name: Install release tool
          command: go get github.com/lnxjedi/github-release
      # Coverage tool
      - run:
          name: Install coverage tool
          command: go get github.com/mattn/goveralls
      # Dependencies for integration tests
      - run:
          name: Install dependencies for integration tests
          command: sudo apt-get update && sudo apt-get install -y ruby python
      - run: go get -v -t -d ./...

      # Test
      - run:
          name: Run integration tests
          command: |
            go test -v --tags 'test integration' -cover -race -coverprofile coverage.out -coverpkg ./... ./bot
          # cat bot/test.log # if testing fails, uncomment and add '|| :' above

      # Publish coverage
      - run:
          name: Publish coverage results
          command: goveralls -coverprofile=coverage.out -service=circle-ci -repotoken=$COVERALLS_TOKEN

      # Build
      - run:
          name: Build platform-specific zip archives
          command: ./mkdist.sh

      # Publish
      # - deploy:
      #     name: Publish archives to Github
      #     command: ./publish.sh

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

    working_directory: ~/gopherbot
    steps:
      - checkout

      # specify any bash command here prefixed with `run: `

      # Get the github publishing tool
      - run:
          name: Install release tool
          command: go get github.com/lnxjedi/github-release
      # Coverage tool
      - run:
          name: Install coverage tool
          command: go get github.com/mattn/goveralls
      # Dependencies for integration tests
      - run:
          name: Install dependencies for integration tests
          command: sudo apt-get update && sudo apt-get install -y ruby python
      - run: go get -v -t -d ./...

      # Test
      - run:
          name: Run integration tests
          command: |
            go test -v --tags 'test integration' -cover -race -coverprofile coverage.out -coverpkg ./... ./bot
          # cat bot/test.log # if testing fails, uncomment and add '|| :' above

      # Publish coverage
      - run:
          name: Publish coverage results
          command: goveralls -coverprofile=coverage.out -service=circle-ci -repotoken=$COVERALLS_TOKEN

      # Build
      - run:
          name: Build platform-specific zip archives
          command: ./mkdist.sh

      # Publish
      # - deploy:
      #     name: Publish archives to Github
      #     command: ./publish.sh

Fix (?) working directory, 2nd try
Fix (?) working directory, 2nd try
