diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e14a900..c87999d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,7 +5,7 @@ env: jobs: build: - name: Test on ${{ matrix.os }} with Go ${{ matrix.go_version }} + name: On ${{ matrix.os }} with Go ${{ matrix.go_version }} runs-on: ubuntu-latest strategy: matrix: @@ -17,15 +17,11 @@ jobs: with: go-version: ${{ matrix.go_version }} id: go - - name: Check out code uses: actions/checkout@v1 - - name: Go mod verify run: go mod verify - - name: Go vet normally run: go vet ./... - - name: Go build run: go build ./... diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e639ca5..7e79cc4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -5,40 +5,48 @@ env: jobs: test: - name: Test on ${{ matrix.os }} with Go ${{ matrix.go_version }} + name: With ${{ matrix.go_version }} runs-on: ubuntu-latest strategy: matrix: go_version: [1.15] - os: [ubuntu-latest, windows-latest, macOS-latest] steps: - name: Set up Go ${{ matrix.go_version }} uses: actions/setup-go@v1 with: go-version: ${{ matrix.go_version }} id: go - - name: Check out code uses: actions/checkout@v1 + - name: Go Test + run: | + go test -timeout 5m -race -v -covermode=atomic -coverprofile=coverage.out ./... + - name: Send coverage to Coveralls + env: + COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + GO111MODULE=off go get -u github.com/mattn/goveralls + $(go env GOPATH)/bin/goveralls -coverprofile=coverage.out -service=github - - name: Staticcheck + staticcheck: + name: StaticCheck + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - name: check uses: grandcolline/golang-github-actions@v1.1.0 with: run: staticcheck token: ${{ secrets.GITHUB_TOKEN }} - - name: Go vet with shadow + vet-shadow: + name: Go Vet with Shadow + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - name: check uses: grandcolline/golang-github-actions@v1.1.0 with: run: shadow token: ${{ secrets.GITHUB_TOKEN }} - - name: Go Test - run: | - go test -timeout 5m -race -v -covermode=atomic -coverprofile=coverage.out ./... - - name: Send coverage to Coveralls - env: - COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - GO111MODULE=off go get -u github.com/mattn/goveralls - $(go env GOPATH)/bin/goveralls -coverprofile=coverage.out -service=github