Skip to content

Commit

Permalink
Merge pull request #28 from ambiknai/master
Browse files Browse the repository at this point in the history
Fix github action issue
  • Loading branch information
k8s-ci-robot committed Aug 18, 2021
2 parents 2a8c81d + b99b16c commit 87eb9b7
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,34 @@ name: Quality
on: [push, pull_request]
jobs:
test:
env:
GOPATH: ${{ github.workspace }}
defaults:
run:
working-directory: ${{ env.GOPATH }}/src/github.com/${{ github.repository }}
name: Test with Coverage
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v1
uses: actions/setup-go@v2
with:
go-version: '1.16'
- name: Check out code
uses: actions/checkout@v2
with:
path: ${{ env.GOPATH }}/src/github.com/${{ github.repository }}
- name: Install dependencies
run: |
go mod download
go mod download
- name: Run Unit tests
run: |
go test -race -covermode atomic -coverprofile=covprofile ./...
go test $(go list ./... | grep -v /vendor/ | grep -v /cmd | grep -v /tests) -race -covermode atomic -coverprofile=covprofile ./...
- name: Install goveralls
env:
GOPATH: ${{ github.workspace }}
run: go install github.com/mattn/goveralls@latest
- name: Send coverage
run: $GOPATH/bin/goveralls -coverprofile=covprofile -service=github
env:
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: goveralls -coverprofile=covprofile -service=github
GOPATH: ${{ github.workspace }}

0 comments on commit 87eb9b7

Please sign in to comment.