add circle ci and rm gitlab ci
This commit is contained in:
parent
f2ea8b503d
commit
6443603f33
67
.circleci/config.yml
Normal file
67
.circleci/config.yml
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
version: 2
|
||||||
|
|
||||||
|
alias:
|
||||||
|
&setup-steps:
|
||||||
|
- run: go get ./...
|
||||||
|
- run: curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b /go/bin v1.17.1
|
||||||
|
&pipeline-steps:
|
||||||
|
- run:
|
||||||
|
name: run static analysis & tests
|
||||||
|
command: make ci
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
golang-1.11-pipeline:
|
||||||
|
working_directory: /go/src/github.com/wagoodman/dive
|
||||||
|
docker:
|
||||||
|
- image: circleci/golang:1.11
|
||||||
|
steps:
|
||||||
|
- checkout
|
||||||
|
- restore_cache:
|
||||||
|
keys:
|
||||||
|
- golang-1.11-{{ checksum "go.sum" }}
|
||||||
|
- *setup-steps
|
||||||
|
- save_cache:
|
||||||
|
key: golang-1.11-{{ checksum "go.sum" }}
|
||||||
|
paths:
|
||||||
|
- "/go/pkg/mod"
|
||||||
|
- *pipeline-steps
|
||||||
|
|
||||||
|
golang-1.12-pipeline:
|
||||||
|
working_directory: /go/src/github.com/wagoodman/dive
|
||||||
|
docker:
|
||||||
|
- image: circleci/golang:1.12
|
||||||
|
steps:
|
||||||
|
- checkout
|
||||||
|
- restore_cache:
|
||||||
|
keys:
|
||||||
|
- golang-1.12-{{ checksum "go.sum" }}
|
||||||
|
- *setup-steps
|
||||||
|
- save_cache:
|
||||||
|
key: golang-1.12-{{ checksum "go.sum" }}
|
||||||
|
paths:
|
||||||
|
- "/go/pkg/mod"
|
||||||
|
- *pipeline-steps
|
||||||
|
|
||||||
|
golang-1.13-pipeline:
|
||||||
|
working_directory: /go/src/github.com/wagoodman/dive
|
||||||
|
docker:
|
||||||
|
- image: circleci/golang:1.13
|
||||||
|
steps:
|
||||||
|
- checkout
|
||||||
|
- restore_cache:
|
||||||
|
keys:
|
||||||
|
- golang-1.13-{{ checksum "go.sum" }}
|
||||||
|
- *setup-steps
|
||||||
|
- save_cache:
|
||||||
|
key: golang-1.13-{{ checksum "go.sum" }}
|
||||||
|
paths:
|
||||||
|
- "/go/pkg/mod"
|
||||||
|
- *pipeline-steps
|
||||||
|
|
||||||
|
workflows:
|
||||||
|
version: 2
|
||||||
|
commit:
|
||||||
|
jobs:
|
||||||
|
- golang-1.11-pipeline
|
||||||
|
- golang-1.12-pipeline
|
||||||
|
- golang-1.13-pipeline
|
@ -1,26 +0,0 @@
|
|||||||
image: golang:1.12.5
|
|
||||||
|
|
||||||
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
|
|
Loading…
x
Reference in New Issue
Block a user