Skip to content

add testcase

add testcase #114

Workflow file for this run

name: Test
on: push
env:
GO111MODULE: on
jobs:
build:
name: Test
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [ '1.21', '1.21.x' ]
steps:
- name: Checkout the repository
uses: actions/checkout@v3
- name: Setup Go ${{ matrix.go-version }}
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
- name: Display Go version
run: go version
- name: Install staticcheck
run: go install honnef.co/go/tools/cmd/staticcheck@latest
- name: Install cover
run: go get -u golang.org/x/tools/cmd/cover
- name: Install vet
run: go get -u github.com/mattn/goveralls
- name: Install goveralls
run: go get -u github.com/mattn/goveralls
- name: Staticcheck
run: staticcheck -checks="all,-ST1000,-SA1019" github.com/msales/gox/...
- name: Vet
run: go vet ./...
- name: Test
run: go test -bench=. -covermode=count -coverprofile=profile_full.cov -coverpkg=github.com/msales/gox/... github.com/msales/gox/...
- name: Goveralls
run: |
cat profile_full.cov | grep -v .pb.go | grep -v mock | grep -v test > profile.cov;
goveralls -coverprofile=profile.cov -service=github || true;