diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..79bc159 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,25 @@ +name: ci +on: [push, pull_request] +env: + GO111MODULE: on +jobs: + tests: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-go@v2 + with: + go-version: '^1.16' + - run: go version + - run: go get github.com/mattn/goveralls + env: + GO111MODULE: off + - run: curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin ${GOLANGCI_RELEASE} + env: + GOLANGCI_RELEASE: v1.37.0 + - run: make build.docker + - run: make test + - run: make check + - run: goveralls -coverprofile=profile.cov -service=github + env: + COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.gitignore b/.gitignore index 4f93e5e..959feb2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ build/ apiserver.local.config/ .idea/ +profile.cov vendor/ diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index f3d60a1..0000000 --- a/.travis.yml +++ /dev/null @@ -1,20 +0,0 @@ -language: go -dist: xenial - -go: - - "1.14.x" - -env: -- GO111MODULE=on GOLANGCI_RELEASE="v1.21.0" - -before_install: - - GO111MODULE=off go get github.com/mattn/goveralls - - GO111MODULE=off go get github.com/lawrencewoodman/roveralls - - curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin ${GOLANGCI_RELEASE} - -script: - - make test - - make build.docker - - make check - - roveralls - - goveralls -v -coverprofile=roveralls.coverprofile -service=travis-ci diff --git a/Makefile b/Makefile index cbb03e9..a6a185b 100644 --- a/Makefile +++ b/Makefile @@ -19,7 +19,7 @@ clean: rm -rf $(OPENAPI) test: - go test -v $(GOPKGS) + go test -v -coverprofile=profile.cov $(GOPKGS) check: go mod download