| 1 | # |
| 2 | # YAML anchor to keep configuration DRY. |
| 3 | # |
| 4 | common: &common |
| 5 | # This conforms to Go workspace requirements (we are pre-modules). |
| 6 | working_directory: /go/src/github.com/google/goterm |
| 7 | steps: |
| 8 | - checkout |
| 9 | - run: |
| 10 | name: Go version |
| 11 | command: go version |
| 12 | - run: |
| 13 | name: Run unit tests |
| 14 | command: go test -v ./... |
| 15 | |
| 16 | # |
| 17 | # CircleCI. |
| 18 | # |
| 19 | version: 2 |
| 20 | |
| 21 | jobs: |
| 22 | go-1.11: |
| 23 | docker: |
| 24 | - image: circleci/golang:1.11 |
| 25 | <<: *common |
| 26 | go-1.12: |
| 27 | docker: |
| 28 | - image: circleci/golang:1.12 |
| 29 | <<: *common |
| 30 | |
| 31 | workflows: |
| 32 | version: 2 |
| 33 | test: |
| 34 | # These will run in parallel. |
| 35 | jobs: |
| 36 | - go-1.11 |
| 37 | - go-1.12 |