From 942e753f874a0baa647e302db7e25bc0d91450a2 Mon Sep 17 00:00:00 2001 From: Mikkel Oscar Lyderik Larsen Date: Fri, 19 Feb 2021 10:31:20 +0100 Subject: [PATCH] Use Github actions instead of travis (#270) Signed-off-by: Mikkel Oscar Lyderik Larsen --- .github/workflows/ci.yaml | 25 +++++++++++++++++++++++++ .gitignore | 1 + .travis.yml | 20 -------------------- Makefile | 2 +- 4 files changed, 27 insertions(+), 21 deletions(-) create mode 100644 .github/workflows/ci.yaml delete mode 100644 .travis.yml 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