Merge pull request #42 from digitalocean/varsha/circleci
Setup CircleCI for clusterlintimage-warning-sha256
commit
6aab133796
|
@ -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
|
|
@ -1,2 +0,0 @@
|
|||
FROM golang:1.12.6
|
||||
RUN go get golang.org/x/lint/golint
|
|
@ -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"]
|
||||
}
|
Loading…
Reference in New Issue