summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Goodman <wagoodman@users.noreply.github.com>2019-09-17 21:18:03 -0400
committerGitHub <noreply@github.com>2019-09-17 21:18:03 -0400
commit2d347b7890bb880b7bfc9e1d7c0c7f356c91755c (patch)
tree9b8f21915b58b53184c783a89e936a7dc290c130
parentd7016d8f3920005fb47e4d68110e33de61cc71a9 (diff)
parent9236307e2946e2de9b3abe1c2be6a1f6f641b418 (diff)
Merge pull request #230 from wagoodman/circle-ci
Add circle ci and rm gitlab ci
-rw-r--r--.circleci/config.yml70
-rw-r--r--.gitlab-ci.yml26
-rw-r--r--Makefile4
3 files changed, 74 insertions, 26 deletions
diff --git a/.circleci/config.yml b/.circleci/config.yml
new file mode 100644
index 0000000..67c9154
--- /dev/null
+++ b/.circleci/config.yml
@@ -0,0 +1,70 @@
+version: 2
+
+jobs:
+ golang-1.11-pipeline:
+ working_directory: /home/circleci/app
+ docker:
+ - image: circleci/golang:1.11
+ environment:
+ GO111MODULE: "on"
+ steps:
+ - checkout
+ - restore_cache:
+ keys:
+ - golang-1.11-{{ checksum "go.sum" }}
+ - run: make setup
+ - save_cache:
+ key: golang-1.11-{{ checksum "go.sum" }}
+ paths:
+ - "/go/pkg/mod"
+ - run:
+ name: run static analysis & tests
+ command: make ci
+
+ golang-1.12-pipeline:
+ working_directory: /home/circleci/app
+ docker:
+ - image: circleci/golang:1.12
+ environment:
+ GO111MODULE: "on"
+ steps:
+ - checkout
+ - restore_cache:
+ keys:
+ - golang-1.12-{{ checksum "go.sum" }}
+ - run: make setup
+ - save_cache:
+ key: golang-1.12-{{ checksum "go.sum" }}
+ paths:
+ - "/go/pkg/mod"
+ - run:
+ name: run static analysis & tests
+ command: make ci
+
+ golang-1.13-pipeline:
+ working_directory: /home/circleci/app
+ docker:
+ - image: circleci/golang:1.13
+ environment:
+ GO111MODULE: "on"
+ steps:
+ - checkout
+ - restore_cache:
+ keys:
+ - golang-1.13-{{ checksum "go.sum" }}
+ - run: make setup
+ - save_cache:
+ key: golang-1.13-{{ checksum "go.sum" }}
+ paths:
+ - "/go/pkg/mod"
+ - run:
+ name: run static analysis & tests
+ command: make ci
+
+workflows:
+ version: 2
+ commit:
+ jobs:
+ - golang-1.11-pipeline
+ - golang-1.12-pipeline
+ - golang-1.13-pipeline
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
deleted file mode 100644
index 5bc5684..0000000
--- a/.gitlab-ci.yml
+++ /dev/null
@@ -1,26 +0,0 @@
-image: golang:1.13
-
-cache:
- paths:
- - .cache
-
-variables:
- GOPATH: $CI_PROJECT_DIR/.cache
-
-stages:
- - setup
- - validation
-
-setup:
- stage: setup
- script:
- - mkdir -p .cache
- - go get ./...
- - curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.17.1
-
-validation:
- stage: validation
- before_script:
- - export PATH="$GOPATH/bin:$PATH"
- script:
- - make ci
diff --git a/Makefile b/Makefile
index 58de9a7..06cf507 100644
--- a/Makefile
+++ b/Makefile
@@ -41,6 +41,10 @@ lint: build
generate-test-data:
docker build -t dive-test:latest -f .data/Dockerfile.test-image . && docker image save -o .data/test-docker-image.tar dive-test:latest && echo "Exported test data!"
+setup:
+ go get ./...
+ curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b /go/bin v1.18.0
+
clean:
rm -rf build
go clean