github.com/scraniel/migrate@v0.0.0-20230320185700-339088f36cee/.circleci/config.yml (about) 1 # Golang CircleCI 2.0 configuration file 2 # 3 # Check https://circleci.com/docs/2.0/language-go/ for more details 4 version: 2.1 5 6 jobs: 7 "golang-1_15": &template 8 machine: 9 # https://circleci.com/docs/2.0/configuration-reference/#available-machine-images 10 image: ubuntu-2004:202010-01 11 # docker_layer_caching: true 12 13 # https://circleci.com/docs/2.0/configuration-reference/#resource_class 14 resource_class: medium 15 16 # Leave working directory unspecified and use defaults: 17 # https://circleci.com/blog/go-v1.11-modules-and-circleci/ 18 # working_directory: /go/src/github.com/golang-migrate/migrate 19 20 environment: 21 GO111MODULE: "on" 22 GO_VERSION: "1.15.x" 23 24 steps: 25 # - setup_remote_docker: 26 # version: 19.03.13 27 # docker_layer_caching: true 28 - run: curl -sL -o ~/bin/gimme https://raw.githubusercontent.com/travis-ci/gimme/master/gimme 29 - run: curl -sfL -o ~/bin/golangci-lint.sh https://install.goreleaser.com/github.com/golangci/golangci-lint.sh 30 - run: chmod +x ~/bin/gimme ~/bin/golangci-lint.sh 31 - run: eval "$(gimme $GO_VERSION)" 32 - run: golangci-lint.sh -b ~/bin v1.37.0 33 - checkout 34 - restore_cache: 35 keys: 36 - go-mod-v1-{{ arch }}-{{ checksum "go.sum" }} 37 - run: golangci-lint run 38 - run: make test COVERAGE_DIR=/tmp/coverage 39 - save_cache: 40 key: go-mod-v1-{{ arch }}-{{ checksum "go.sum" }} 41 paths: 42 - "/go/pkg/mod" 43 - run: go get github.com/mattn/goveralls 44 - run: goveralls -service=circle-ci -coverprofile /tmp/coverage/combined.txt 45 46 "golang-1_16": 47 <<: *template 48 environment: 49 GO_VERSION: "1.16.x" 50 51 workflows: 52 version: 2 53 build: 54 jobs: 55 - "golang-1_15" 56 - "golang-1_16"