test.yml 644 B

12345678910111213141516171819202122232425
  1. on: [push, pull_request]
  2. name: Test
  3. jobs:
  4. test:
  5. name: Go tests
  6. strategy:
  7. fail-fast: false
  8. matrix:
  9. os: [ubuntu-latest, macos-latest, windows-latest]
  10. runs-on: ${{ matrix.os }}
  11. steps:
  12. - name: Install Go ${{ matrix.go }}
  13. uses: actions/setup-go@v2
  14. with:
  15. go-version: 1.x
  16. - name: Checkout repository
  17. uses: actions/checkout@v2
  18. - name: Run staticcheck
  19. run: |
  20. go install honnef.co/go/tools/cmd/staticcheck@latest
  21. staticcheck ./...
  22. - name: Run vet
  23. run: go vet ./...
  24. - name: Run tests
  25. run: go test -race ./...