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 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"] -}