Merge pull request #138 from devimc/2020-08-17/enableGithubActions

github: enable github actions
This commit is contained in:
Julio Montes
2020-08-19 07:15:53 -05:00
committed by GitHub
2 changed files with 40 additions and 1 deletions

40
.github/workflows/main.yml vendored Normal file
View File

@@ -0,0 +1,40 @@
on: ["pull_request"]
name: Unit tests
jobs:
test:
strategy:
matrix:
go-version: [1.13.x, 1.14.x, 1.15.x]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
env:
GO111MODULE: off
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- name: Setup GOPATH
run: |
gopath_org=$(go env GOPATH)/src/github.com/intel/
mkdir -p ${gopath_org}
ln -s ${PWD} ${gopath_org}
- name: Checkout code
uses: actions/checkout@v2
- name: Install gometalinter
run: |
go get github.com/alecthomas/gometalinter
$(go env GOPATH)/bin/gometalinter --install
- name: Running gometalinter
run: |
gopath_repo=$(go env GOPATH)/src/github.com/intel/govmm
pushd ${gopath_repo}
$(go env GOPATH)/bin/gometalinter --tests --vendor --disable-all --enable=misspell --enable=vet --enable=ineffassign --enable=gofmt --enable=gocyclo --cyclo-over=15 --enable=golint --enable=errcheck --enable=deadcode --enable=staticcheck -enable=gas ./...
- name: Send coverage
env:
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gopath_repo=$(go env GOPATH)/src/github.com/intel/govmm
pushd ${gopath_repo}
go get github.com/mattn/goveralls
$(go env GOPATH)/bin/goveralls -v -service=github

View File

@@ -5,7 +5,6 @@ go:
- "1.11"
- tip
arch:
- amd64
- s390x
go_import_path: github.com/intel/govmm