test.yml 703 B

12345678910111213141516171819202122232425262728293031323334353637
  1. name: Test
  2. on:
  3. push:
  4. branches:
  5. - "*"
  6. pull_request:
  7. branches:
  8. - "*"
  9. jobs:
  10. test:
  11. strategy:
  12. matrix:
  13. platform: [ ubuntu-latest, windows-latest ]
  14. runs-on: ${{ matrix.platform }}
  15. steps:
  16. - uses: actions/checkout@v3
  17. - name: Set up Go
  18. uses: actions/setup-go@v2
  19. with:
  20. go-version: 1.23
  21. - name: Build
  22. run: go build -v ./...
  23. - name: Set up gotestsum
  24. run: |
  25. go install gotest.tools/gotestsum@latest
  26. - name: Test
  27. run: |
  28. gotestsum --raw-command -- go test -json ./... --race
  29. - name: Validate Config
  30. run: go generate ./... && git diff --exit-code