github.com/hashicorp/terraform-plugin-sdk@v1.17.2/.circleci/config.yml (about) 1 version: 2.1 2 3 commands: 4 get_dependencies: 5 steps: 6 - checkout 7 - restore_cache: 8 keys: 9 - go-mod-v1-{{ checksum "go.sum" }} 10 - run: go get -v -d ./... 11 - save_cache: 12 key: go-mod-v1-{{ checksum "go.sum" }} 13 paths: 14 - "/go/pkg/mod" 15 16 jobs: 17 "docker-go114 build": 18 docker: 19 - image: circleci/golang:1.14 20 steps: 21 - get_dependencies 22 - run: go build ./... 23 "docker-go114 test": 24 docker: 25 - image: circleci/golang:1.14 26 parameters: 27 test_results: 28 type: string 29 default: /tmp/test-results 30 steps: 31 - get_dependencies 32 - run: mkdir -p << parameters.test_results >>/report 33 - run: 34 command: | 35 gotestsum --junitfile << parameters.test_results >>/report/gotestsum-report.xml -- -coverprofile=cover.out ./... 36 go tool cover -html=cover.out -o coverage.html 37 mv coverage.html << parameters.test_results >> 38 - store_artifacts: 39 path: << parameters.test_results >> 40 destination: raw-test-output 41 - store_test_results: 42 path: << parameters.test_results >> 43 "docker-go114 vet": 44 docker: 45 - image: circleci/golang:1.14 46 steps: 47 - get_dependencies 48 - run: go vet ./... 49 "docker-go114 gofmt": 50 docker: 51 - image: circleci/golang:1.14 52 steps: 53 - get_dependencies 54 - run: ./scripts/gofmtcheck.sh 55 "docker-go114 release": 56 docker: 57 - image: circleci/golang:1.14 58 steps: 59 - add_ssh_keys: 60 fingerprints: 61 - "3b:ec:3f:f1:0d:1a:a9:2c:a6:6f:03:cb:46:37:11:50" 62 - get_dependencies 63 - run: ./scripts/release/release.sh 64 65 workflows: 66 version: 2 67 pr: 68 jobs: 69 - "docker-go114 build" 70 - "docker-go114 test": 71 requires: 72 - "docker-go114 build" 73 - "docker-go114 vet": 74 requires: 75 - "docker-go114 build" 76 - "docker-go114 gofmt": 77 requires: 78 - "docker-go114 build" 79 release: 80 jobs: 81 - "docker-go114 build" 82 - "docker-go114 test": 83 requires: 84 - "docker-go114 build" 85 - "docker-go114 vet": 86 requires: 87 - "docker-go114 build" 88 - "docker-go114 gofmt": 89 requires: 90 - "docker-go114 build" 91 - trigger-release: 92 filters: 93 branches: 94 only: 95 - v1-maint 96 type: approval 97 - "docker-go114 release": 98 filters: 99 branches: 100 only: 101 - v1-maint 102 requires: 103 - trigger-release 104 - "docker-go114 test" 105 - "docker-go114 vet" 106 - "docker-go114 gofmt"