go.yml 641 B

12345678910111213141516171819202122232425262728293031323334
  1. name: Go
  2. on:
  3. push:
  4. branches: [ master ]
  5. pull_request:
  6. branches: [ master ]
  7. jobs:
  8. build:
  9. name: Build
  10. runs-on: ubuntu-latest
  11. steps:
  12. - name: Set up Go 1.x
  13. uses: actions/setup-go@v2
  14. with:
  15. go-version: ^1.13
  16. id: go
  17. - name: Check out code into the Go module directory
  18. uses: actions/checkout@v2
  19. - name: Get dependencies
  20. run: |
  21. go get -v -t -d ./...
  22. - name: Test
  23. run: go test -race -coverprofile=coverage.txt -covermode=atomic ./...
  24. - name: Codecov
  25. uses: codecov/codecov-action@v1.0.6
  26. with:
  27. token: ${{secrets.CODECOV_TOKEN}}