Use Github actions instead of travis (#270)

Signed-off-by: Mikkel Oscar Lyderik Larsen <mikkel.larsen@zalando.de>
This commit is contained in:
Mikkel Oscar Lyderik Larsen 2021-02-19 10:31:20 +01:00 committed by GitHub
parent 86ed6ec102
commit 942e753f87
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 27 additions and 21 deletions

25
.github/workflows/ci.yaml vendored Normal file
View File

@ -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 }}

1
.gitignore vendored
View File

@ -1,4 +1,5 @@
build/
apiserver.local.config/
.idea/
profile.cov
vendor/

View File

@ -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

View File

@ -19,7 +19,7 @@ clean:
rm -rf $(OPENAPI)
test:
go test -v $(GOPKGS)
go test -v -coverprofile=profile.cov $(GOPKGS)
check:
go mod download