name: Go tests
on: [push, pull_request]
jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-go@v4
        with:
          go-version-file: go.mod
          check-latest: true
      - run: go test -short ./...
      - run: go test -short -tags purego ./...
      - run: GOARCH=386 go test -c
      - run: GOARCH=arm go test -c
      - run: GOARCH=arm64 go test -c
      - run: GOARCH=ppc64 go test -c
      - run: GOARCH=ppc64le go test -c
      - run: GOARCH=riscv64 go test -c
      - run: GOARCH=s390x go test -c
      - run: GOARCH=loong64 go test -c
      - run: GOOS=js GOARCH=wasm go test -c
