From a87e1dbd2f0cffc9d999fb4a8d1e5450ef67a885 Mon Sep 17 00:00:00 2001 From: Varsha Varadarajan Date: Tue, 16 Jul 2019 12:50:41 -0400 Subject: [PATCH 1/2] Add circleci config yml --- .circleci/config.yml | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..251e571 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,39 @@ +version: 2 +jobs: + license: + docker: + - image: golang:1.12.6 + steps: + - checkout + - run: ./script/check-licenses.sh + vet: + environment: + GOFLAGS: "-mod=vendor" + docker: + - image: golang:1.12.6 + steps: + - checkout + - run: go vet ./... + lint: + docker: + - image: golang:1.12.6 + steps: + - checkout + - run: go get golang.org/x/lint/golint + - run: sh -c golint -set_exit_status $(go list ./...) + test: + environment: + GOFLAGS: "-mod=vendor" + docker: + - image: golang:1.12.6 + steps: + - checkout + - run: go test -race -cover ./... +workflows: + version: 2 + all: + jobs: + - license + - vet + - lint + - test From 2e3ccabe94cb744b5ee7dadaec8f66c7e4a80d74 Mon Sep 17 00:00:00 2001 From: Varsha Varadarajan Date: Tue, 16 Jul 2019 12:51:24 -0400 Subject: [PATCH 2/2] Delete setup for github actions --- .github/golint/Dockerfile | 2 -- .github/main.workflow | 40 --------------------------------------- 2 files changed, 42 deletions(-) delete mode 100644 .github/golint/Dockerfile delete mode 100644 .github/main.workflow diff --git a/.github/golint/Dockerfile b/.github/golint/Dockerfile deleted file mode 100644 index c3167af..0000000 --- a/.github/golint/Dockerfile +++ /dev/null @@ -1,2 +0,0 @@ -FROM golang:1.12.6 -RUN go get golang.org/x/lint/golint diff --git a/.github/main.workflow b/.github/main.workflow deleted file mode 100644 index 5a6954c..0000000 --- a/.github/main.workflow +++ /dev/null @@ -1,40 +0,0 @@ -workflow "Pull Request" { - # TODO(awg): This won't run checks on PRs from forks. For now that seems to be - # a limitation of GH actions. - on = "push" - resolves = [ - "vet", - "lint", - "test", - "check-licenses", - ] -} - -action "vet" { - uses = "docker://golang:1.12.6" - env = { - GOFLAGS = "-mod=vendor" - } - runs = ["go", "vet", "./..."] -} - -action "lint" { - uses = "./.github/golint" - env = { - GOFLAGS = "-mod=vendor" - } - runs = ["sh", "-c", "golint -set_exit_status $(go list ./...)"] -} - -action "test" { - uses = "docker://golang:1.12.6" - env = { - GOFLAGS = "-mod=vendor" - } - runs = ["go", "test", "-race", "-cover", "./..."] -} - -action "check-licenses" { - uses = "docker://golang:1.12.6" - runs = ["./script/check-licenses.sh"] -}