---
version: 2

jobs:
  build:
    working_directory: ~/helm.sh/helm
    docker:
      - image: circleci/golang:1.16
      
        auth:
          username: $DOCKER_USER
          password: $DOCKER_PASS

    environment:
      GOCACHE: "/tmp/go/cache"
      GOLANGCI_LINT_VERSION: "1.36.0"

    steps:
      - checkout
      - run:
          name: install test dependencies
          command: .circleci/bootstrap.sh
      - run:
          name: test style
          command: make test-style
      - run:
          name: test
          command: make test-coverage
      - deploy:
          name: deploy
          command: .circleci/deploy.sh

workflows:
  version: 2
  build:
    jobs:
      - build:
          filters:
            tags:
              only: /.*/
