Use CircleCI
Squashed commit of the following:
commit 5f63ff0333a9608530b4bb79b44af837224f80a5
Author: Dale Hui <dhui@users.noreply.github.com>
Date: Mon Jan 25 20:36:57 2021 -0800
Remove unnecessary parameter to checkout
commit b87711057588bfe05fb01d8ff9b679200b2c3015
Author: Dale Hui <dhui@users.noreply.github.com>
Date: Mon Jan 25 20:30:37 2021 -0800
Give up trying to only push coverage for Go 1.15 via YAML templates
commit 6f366c35d11a903fdd8d92738de26073fe7a9c0f
Author: Dale Hui <dhui@users.noreply.github.com>
Date: Mon Jan 25 20:27:20 2021 -0800
YAML template merging only works with maps, not scalars, so specify the current directory for "checkout"
commit e65ff967018508f36e9b9d88f20fe135d8ce6c3e
Author: Dale Hui <dhui@users.noreply.github.com>
Date: Mon Jan 25 20:21:30 2021 -0800
Use `go get` instead of `go install` and add template for steps
commit fef2a9e7f9bfbb6070b849199e7d0cced8c6747a
Author: Dale Hui <dhui@users.noreply.github.com>
Date: Mon Jan 25 19:59:24 2021 -0800
Push code coverage to coveralls.io
- Only push code coverage for latest support version of Go
commit 48d78bb2576aa8662daaa3e116d0e19dafa77279
Author: Dale Hui <dhui@users.noreply.github.com>
Date: Tue Dec 22 22:24:13 2020 -0800
golangci-lint runs slowly on circle ci machines...
commit d47e04f9aad971a72f169089369ed9e976fbf94f
Author: Dale Hui <dhui@users.noreply.github.com>
Date: Tue Dec 22 22:20:35 2020 -0800
Cleanup setup and remove debugging commands
commit 063337f2faff23b6ca636d77acbd4c504ac6914b
Author: Dale Hui <dhui@users.noreply.github.com>
Date: Tue Dec 22 22:17:57 2020 -0800
try using ~/bin
commit 57f34fbf5ce38ff8fdfdb4be43958d43db01d9f6
Author: Dale Hui <dhui@users.noreply.github.com>
Date: Tue Dec 22 22:13:55 2020 -0800
Install golangci-lint in another dir
commit 2b5d6d65ee4807e3c2df0afffc29498defe5a6c3
Author: Dale Hui <dhui@users.noreply.github.com>
Date: Tue Dec 22 22:03:08 2020 -0800
More go env debugging
commit 6719f663d582e59a551bb10ff7365aef814c1d85
Author: Dale Hui <dhui@users.noreply.github.com>
Date: Tue Dec 22 21:59:24 2020 -0800
Sparate downloading and running of golangci-lint.sh
commit 6e9ec9ff0c2d7353b711af5ad685bb4d07ff7292
Author: Dale Hui <dhui@users.noreply.github.com>
Date: Tue Dec 22 21:54:44 2020 -0800
debug gimme env
commit 706a43ca67e012c7982deb115a7168fc2f9067c3
Author: Dale Hui <dhui@users.noreply.github.com>
Date: Tue Dec 22 21:47:01 2020 -0800
debug go env
commit 18694c6419ceeaf0b649939249a618f3876ef530
Author: Dale Hui <dhui@users.noreply.github.com>
Date: Tue Dec 22 21:39:53 2020 -0800
Use .x version of Go
commit 2e4a87b03d1e0b8cf66719bea672304ae008d881
Author: Dale Hui <dhui@users.noreply.github.com>
Date: Tue Dec 22 21:36:01 2020 -0800
correctly use gimme
commit 99a1b838df8832243fc85cdb30d69a07042f9f93
Author: Dale Hui <dhui@users.noreply.github.com>
Date: Tue Dec 22 21:31:45 2020 -0800
Install golangci-lint after installing requested version of Go
commit cecf219e557d5cac26f3f1f43955cfcdb397bb50
Author: Dale Hui <dhui@users.noreply.github.com>
Date: Tue Dec 22 21:29:48 2020 -0800
Still don't support docker layer caching
commit 244ec8fe0b6e5d28cb9c16159bbc3d36ba5ec523
Author: Dale Hui <dhui@users.noreply.github.com>
Date: Tue Dec 22 21:28:33 2020 -0800
Try using machine executor
commit 44d3b29a1e8f953dcf4a2051e0d1037e7b62f85b
Author: Dale Hui <dhui@users.noreply.github.com>
Date: Tue Dec 22 21:07:09 2020 -0800
Fix docker run
commit 525983e81d6a3080e2b28bfdb601581346926450
Author: Dale Hui <dhui@users.noreply.github.com>
Date: Tue Dec 22 21:03:39 2020 -0800
properly specify build-arg
commit d5eed206a6b11c2606690ffdee4639e5399cdfc7
Author: Dale Hui <dhui@users.noreply.github.com>
Date: Tue Dec 22 20:54:06 2020 -0800
Try running CircleCI tests in a Docker container
commit 35e62d1c4ccdeb528495f9d28f26a049bcc93bd8
Merge: 90268de a53e6fc
Author: Dale Hui <dhui@users.noreply.github.com>
Date: Mon Dec 21 20:50:58 2020 -0800
Merge remote-tracking branch 'origin/master' into circleci
commit 90268dedc2cf72ab498ebfd26465551a16463ee7
Author: Dale Hui <dhui@users.noreply.github.com>
Date: Mon Dec 21 20:47:46 2020 -0800
Update golangci lint to v1.33.0
commit d5e0747a53ddfdb7b1ce6ff4bacb236bfc1b7794
Author: Dale Hui <dhui@users.noreply.github.com>
Date: Mon Dec 21 20:44:45 2020 -0800
Don't have access to docker layer caching
commit 6aaecb3b761809b6cf2b4f365f2f9d62f410661d
Author: Dale Hui <dhui@users.noreply.github.com>
Date: Mon Dec 21 20:43:52 2020 -0800
Don't have access to xlarge
commit 275de107de76ced3d6b20e913ffddff84919c3e5
Author: Dale Hui <dhui@users.noreply.github.com>
Date: Mon Dec 21 20:39:14 2020 -0800
CircleCI job names can't have a '.' character
commit e1d339f0eb10519f6002939147201060415a98bb
Author: Dale Hui <dhui@users.noreply.github.com>
Date: Mon Dec 21 20:30:51 2020 -0800
Update CircleCI config
commit d65194971c028af94e7a3cd171eb6221a08dde05
Author: Dale Hui <dhui@users.noreply.github.com>
Date: Fri Aug 2 00:05:59 2019 -0700
Add config for CircleCI
commit 19d7355548c2a6d64225ea63368e10e19eb43d19
Author: Dale Hui <dhui@users.noreply.github.com>
Date: Tue Jul 30 00:12:41 2019 -0700
Update golangci-lint from v1.16.0 to v1.17.1
This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
# Golang CircleCI 2.0 configuration file
|
||||
#
|
||||
# Check https://circleci.com/docs/2.0/language-go/ for more details
|
||||
version: 2.1
|
||||
|
||||
jobs:
|
||||
"golang-1_14": &template
|
||||
machine:
|
||||
# https://circleci.com/docs/2.0/configuration-reference/#available-machine-images
|
||||
image: ubuntu-2004:202010-01
|
||||
# docker_layer_caching: true
|
||||
|
||||
# https://circleci.com/docs/2.0/configuration-reference/#resource_class
|
||||
resource_class: medium
|
||||
|
||||
# Leave working directory unspecified and use defaults:
|
||||
# https://circleci.com/blog/go-v1.11-modules-and-circleci/
|
||||
# working_directory: /go/src/github.com/golang-migrate/migrate
|
||||
|
||||
environment:
|
||||
GO111MODULE: "on"
|
||||
GO_VERSION: "1.14.x"
|
||||
|
||||
steps:
|
||||
# - setup_remote_docker:
|
||||
# version: 19.03.13
|
||||
# docker_layer_caching: true
|
||||
- restore_cache:
|
||||
keys:
|
||||
- go-mod-v1-{{ arch }}-{{ .Branch }}-{{ checksum "go.sum" }}
|
||||
- run: curl -sL -o ~/bin/gimme https://raw.githubusercontent.com/travis-ci/gimme/master/gimme
|
||||
- run: curl -sfL -o ~/bin/golangci-lint.sh https://install.goreleaser.com/github.com/golangci/golangci-lint.sh
|
||||
- run: chmod +x ~/bin/gimme ~/bin/golangci-lint.sh
|
||||
- run: eval "$(gimme $GO_VERSION)"
|
||||
- run: golangci-lint.sh -b ~/bin v1.33.0
|
||||
- checkout
|
||||
- run: golangci-lint run
|
||||
- run: make test COVERAGE_DIR=/tmp/coverage
|
||||
- save_cache:
|
||||
key: go-mod-v1-{{ arch }}-{{ .Branch }}-{{ checksum "go.sum" }}
|
||||
paths:
|
||||
- "/go/pkg/mod"
|
||||
- run: go get github.com/mattn/goveralls
|
||||
- run: goveralls -service=circle-ci -coverprofile /tmp/coverage/combined.txt
|
||||
|
||||
"golang-1_15":
|
||||
<<: *template
|
||||
environment:
|
||||
GO_VERSION: "1.15.x"
|
||||
|
||||
workflows:
|
||||
version: 2
|
||||
build:
|
||||
jobs:
|
||||
- "golang-1_14"
|
||||
- "golang-1_15"
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
run:
|
||||
# timeout for analysis, e.g. 30s, 5m, default is 1m
|
||||
timeout: 2m
|
||||
timeout: 5m
|
||||
linters:
|
||||
enable:
|
||||
#- golint
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
ARG DOCKER_IMAGE
|
||||
FROM $DOCKER_IMAGE
|
||||
|
||||
RUN apk add --no-cache git gcc musl-dev make
|
||||
|
||||
WORKDIR /go/src/github.com/golang-migrate/migrate
|
||||
|
||||
ENV GO111MODULE=on
|
||||
ENV COVERAGE_DIR=/tmp/coverage
|
||||
|
||||
COPY go.mod go.sum ./
|
||||
|
||||
RUN go mod download
|
||||
|
||||
COPY . ./
|
||||
|
||||
CMD ["make", "test"]
|
||||
Reference in New Issue
Block a user