Skip to content

Commit d8de137

Browse files
Prometheus2677FPiety0521
authored and
FPiety0521
committed
Use CircleCI
Squashed commit of the following: commit 5f63ff0333a9608530b4bb79b44af837224f80a5 Author: Dale Hui <[email protected]> Date: Mon Jan 25 20:36:57 2021 -0800 Remove unnecessary parameter to checkout commit b87711057588bfe05fb01d8ff9b679200b2c3015 Author: Dale Hui <[email protected]> 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 <[email protected]> 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 <[email protected]> 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 <[email protected]> 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 <[email protected]> Date: Tue Dec 22 22:24:13 2020 -0800 golangci-lint runs slowly on circle ci machines... commit d47e04f9aad971a72f169089369ed9e976fbf94f Author: Dale Hui <[email protected]> Date: Tue Dec 22 22:20:35 2020 -0800 Cleanup setup and remove debugging commands commit 063337f2faff23b6ca636d77acbd4c504ac6914b Author: Dale Hui <[email protected]> Date: Tue Dec 22 22:17:57 2020 -0800 try using ~/bin commit 57f34fbf5ce38ff8fdfdb4be43958d43db01d9f6 Author: Dale Hui <[email protected]> Date: Tue Dec 22 22:13:55 2020 -0800 Install golangci-lint in another dir commit 2b5d6d65ee4807e3c2df0afffc29498defe5a6c3 Author: Dale Hui <[email protected]> Date: Tue Dec 22 22:03:08 2020 -0800 More go env debugging commit 6719f663d582e59a551bb10ff7365aef814c1d85 Author: Dale Hui <[email protected]> Date: Tue Dec 22 21:59:24 2020 -0800 Sparate downloading and running of golangci-lint.sh commit 6e9ec9ff0c2d7353b711af5ad685bb4d07ff7292 Author: Dale Hui <[email protected]> Date: Tue Dec 22 21:54:44 2020 -0800 debug gimme env commit 706a43ca67e012c7982deb115a7168fc2f9067c3 Author: Dale Hui <[email protected]> Date: Tue Dec 22 21:47:01 2020 -0800 debug go env commit 18694c6419ceeaf0b649939249a618f3876ef530 Author: Dale Hui <[email protected]> Date: Tue Dec 22 21:39:53 2020 -0800 Use .x version of Go commit 2e4a87b03d1e0b8cf66719bea672304ae008d881 Author: Dale Hui <[email protected]> Date: Tue Dec 22 21:36:01 2020 -0800 correctly use gimme commit 99a1b838df8832243fc85cdb30d69a07042f9f93 Author: Dale Hui <[email protected]> Date: Tue Dec 22 21:31:45 2020 -0800 Install golangci-lint after installing requested version of Go commit cecf219e557d5cac26f3f1f43955cfcdb397bb50 Author: Dale Hui <[email protected]> Date: Tue Dec 22 21:29:48 2020 -0800 Still don't support docker layer caching commit 244ec8fe0b6e5d28cb9c16159bbc3d36ba5ec523 Author: Dale Hui <[email protected]> Date: Tue Dec 22 21:28:33 2020 -0800 Try using machine executor commit 44d3b29a1e8f953dcf4a2051e0d1037e7b62f85b Author: Dale Hui <[email protected]> Date: Tue Dec 22 21:07:09 2020 -0800 Fix docker run commit 525983e81d6a3080e2b28bfdb601581346926450 Author: Dale Hui <[email protected]> Date: Tue Dec 22 21:03:39 2020 -0800 properly specify build-arg commit d5eed206a6b11c2606690ffdee4639e5399cdfc7 Author: Dale Hui <[email protected]> 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 <[email protected]> Date: Mon Dec 21 20:50:58 2020 -0800 Merge remote-tracking branch 'origin/master' into circleci commit 90268dedc2cf72ab498ebfd26465551a16463ee7 Author: Dale Hui <[email protected]> Date: Mon Dec 21 20:47:46 2020 -0800 Update golangci lint to v1.33.0 commit d5e0747a53ddfdb7b1ce6ff4bacb236bfc1b7794 Author: Dale Hui <[email protected]> Date: Mon Dec 21 20:44:45 2020 -0800 Don't have access to docker layer caching commit 6aaecb3b761809b6cf2b4f365f2f9d62f410661d Author: Dale Hui <[email protected]> Date: Mon Dec 21 20:43:52 2020 -0800 Don't have access to xlarge commit 275de107de76ced3d6b20e913ffddff84919c3e5 Author: Dale Hui <[email protected]> Date: Mon Dec 21 20:39:14 2020 -0800 CircleCI job names can't have a '.' character commit e1d339f0eb10519f6002939147201060415a98bb Author: Dale Hui <[email protected]> Date: Mon Dec 21 20:30:51 2020 -0800 Update CircleCI config commit d65194971c028af94e7a3cd171eb6221a08dde05 Author: Dale Hui <[email protected]> Date: Fri Aug 2 00:05:59 2019 -0700 Add config for CircleCI commit 19d7355548c2a6d64225ea63368e10e19eb43d19 Author: Dale Hui <[email protected]> Date: Tue Jul 30 00:12:41 2019 -0700 Update golangci-lint from v1.16.0 to v1.17.1
1 parent 3114ce4 commit d8de137

File tree

3 files changed

+74
-1
lines changed

3 files changed

+74
-1
lines changed

.circleci/config.yml

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
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_14": &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.14.x"
23+
24+
steps:
25+
# - setup_remote_docker:
26+
# version: 19.03.13
27+
# docker_layer_caching: true
28+
- restore_cache:
29+
keys:
30+
- go-mod-v1-{{ arch }}-{{ .Branch }}-{{ checksum "go.sum" }}
31+
- run: curl -sL -o ~/bin/gimme https://raw.githubusercontent.com/travis-ci/gimme/master/gimme
32+
- run: curl -sfL -o ~/bin/golangci-lint.sh https://install.goreleaser.com/github.com/golangci/golangci-lint.sh
33+
- run: chmod +x ~/bin/gimme ~/bin/golangci-lint.sh
34+
- run: eval "$(gimme $GO_VERSION)"
35+
- run: golangci-lint.sh -b ~/bin v1.33.0
36+
- checkout
37+
- run: golangci-lint run
38+
- run: make test COVERAGE_DIR=/tmp/coverage
39+
- save_cache:
40+
key: go-mod-v1-{{ arch }}-{{ .Branch }}-{{ 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_15":
47+
<<: *template
48+
environment:
49+
GO_VERSION: "1.15.x"
50+
51+
workflows:
52+
version: 2
53+
build:
54+
jobs:
55+
- "golang-1_14"
56+
- "golang-1_15"

.golangci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
run:
22
# timeout for analysis, e.g. 30s, 5m, default is 1m
3-
timeout: 2m
3+
timeout: 5m
44
linters:
55
enable:
66
#- golint

Dockerfile.circleci

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
ARG DOCKER_IMAGE
2+
FROM $DOCKER_IMAGE
3+
4+
RUN apk add --no-cache git gcc musl-dev make
5+
6+
WORKDIR /go/src/github.com/golang-migrate/migrate
7+
8+
ENV GO111MODULE=on
9+
ENV COVERAGE_DIR=/tmp/coverage
10+
11+
COPY go.mod go.sum ./
12+
13+
RUN go mod download
14+
15+
COPY . ./
16+
17+
CMD ["make", "test"]

0 commit comments

Comments
 (0)