version: 2
jobs:
  build:
    environment:
      GO111MODULE: "on"
    docker:
      - image: circleci/golang:1.11
    working_directory: /go/src/github.com/alecthomas/participle
    steps:
      - checkout
      - run:
          name: Prepare
          command: |
            go get -v github.com/jstemmer/go-junit-report
            curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | bash -s v1.26.0
            mkdir ~/report
          when: always
      - run:
          name: Test
          command: |
            (go test -v ./... && (cd ./_examples && go test ./...)) 2>&1 | tee report.txt && go-junit-report < report.txt > ~/report/junit.xml
      - run:
          name: Lint
          command: |
            go build ./...
            ./bin/golangci-lint run
      - store_test_results:
          path: ~/report

version: 2
jobs:
  build:
    environment:
      GO111MODULE: "on"
    docker:
      - image: circleci/golang:1.14
    working_directory: /go/src/github.com/alecthomas/participle
    steps:
      - checkout
      - run:
          name: Prepare
          command: |
            go get -v github.com/jstemmer/go-junit-report
            curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | bash -s v1.26.0
            mkdir ~/report
          when: always
      - run:
          name: Test
          command: |
            (go test -v ./... && (cd ./_examples && go test ./...)) 2>&1 | tee report.txt && go-junit-report < report.txt > ~/report/junit.xml
      - run:
          name: Lint
          command: |
            go build ./...
            ./bin/golangci-lint run
      - store_test_results:
          path: ~/report

Use Go 1.14 for tests.
Use Go 1.14 for tests.
