Files
kata-containers/.github/workflows/main.yml
James O. D. Hunt 9f309c2aa1 misc: Update for new GitHub organisation name
`govmm` is now part of the `kata-containers` GitHub organisation, so
update to reflect this.

Fixes: #145.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2020-10-09 09:10:10 +01:00

41 lines
1.4 KiB
YAML

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/kata-containers/
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/kata-containers/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/kata-containers/govmm
pushd ${gopath_repo}
go get github.com/mattn/goveralls
$(go env GOPATH)/bin/goveralls -v -service=github