Use Github.com actions to run tests and e2e tests. (#1215)
* Use GH action to run tests and end 2 end tests. * Remove travis.
This commit is contained in:
parent
49158ecb68
commit
a7f453352a
|
|
@ -0,0 +1,24 @@
|
||||||
|
name: ubuntu
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
tests:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v1
|
||||||
|
- uses: actions/setup-go@v2
|
||||||
|
with:
|
||||||
|
go-version: "^1.15.5"
|
||||||
|
- name: Make dependencies
|
||||||
|
run: make deps
|
||||||
|
- name: Compile
|
||||||
|
run: make linux
|
||||||
|
- name: Run unit tests
|
||||||
|
run: go test ./...
|
||||||
|
- name: Run end-2-end tests
|
||||||
|
run: make e2e
|
||||||
23
.travis.yml
23
.travis.yml
|
|
@ -1,23 +0,0 @@
|
||||||
dist: trusty
|
|
||||||
sudo: false
|
|
||||||
|
|
||||||
branches:
|
|
||||||
only:
|
|
||||||
- master
|
|
||||||
|
|
||||||
language: go
|
|
||||||
|
|
||||||
go:
|
|
||||||
- "1.14.x"
|
|
||||||
|
|
||||||
before_install:
|
|
||||||
- go get github.com/mattn/goveralls
|
|
||||||
|
|
||||||
install:
|
|
||||||
- make deps
|
|
||||||
|
|
||||||
script:
|
|
||||||
- hack/verify-codegen.sh
|
|
||||||
- travis_wait 20 go test -race -covermode atomic -coverprofile=profile.cov ./pkg/... -v
|
|
||||||
- goveralls -coverprofile=profile.cov -service=travis-ci -v
|
|
||||||
- make e2e
|
|
||||||
|
|
@ -16,7 +16,7 @@ pipeline:
|
||||||
- desc: 'Install go'
|
- desc: 'Install go'
|
||||||
cmd: |
|
cmd: |
|
||||||
cd /tmp
|
cd /tmp
|
||||||
wget -q https://storage.googleapis.com/golang/go1.14.7.linux-amd64.tar.gz -O go.tar.gz
|
wget -q https://storage.googleapis.com/golang/go1.15.5.linux-amd64.tar.gz -O go.tar.gz
|
||||||
tar -xf go.tar.gz
|
tar -xf go.tar.gz
|
||||||
mv go /usr/local
|
mv go /usr/local
|
||||||
ln -s /usr/local/go/bin/go /usr/bin/go
|
ln -s /usr/local/go/bin/go /usr/bin/go
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue