test.yml 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. name: Test
  2. on:
  3. push:
  4. branches:
  5. - master
  6. - v*
  7. - dev-*
  8. paths:
  9. - "**/*.go"
  10. - "go.mod"
  11. - "go.sum"
  12. - ".github/workflows/test.yml"
  13. pull_request:
  14. types: [opened, synchronize, reopened]
  15. paths:
  16. - "**/*.go"
  17. - "go.mod"
  18. - "go.sum"
  19. - ".github/workflows/test.yml"
  20. jobs:
  21. test:
  22. runs-on: ${{ matrix.os }}
  23. strategy:
  24. fail-fast: false
  25. matrix:
  26. os: [windows-latest, ubuntu-latest, macos-latest]
  27. steps:
  28. - name: Set up Go 1.x
  29. uses: actions/setup-go@v2
  30. with:
  31. go-version: ^1.16.4
  32. - name: Checkout codebase
  33. uses: actions/checkout@v2
  34. with:
  35. fetch-depth: 0
  36. - name: Test
  37. run: |
  38. export PATH=$(go env GOPATH)/bin:${PATH}
  39. go install -v github.com/ory/go-acc@latest
  40. go-acc --covermode=atomic -o=coverage.txt ./...
  41. shell: bash
  42. - name: Upload codecov
  43. run: bash <(curl -s https://codecov.io/bash)
  44. shell: bash