Add GitHub actions test workflow
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
new file mode 100644
index 0000000..c541752
--- /dev/null
+++ b/.github/workflows/test.yml
@@ -0,0 +1,41 @@
+name: test
+
+on:
+ pull_request:
+ branches:
+ - main
+ push:
+ branches:
+ - main
+
+env:
+ GOPROXY: https://proxy.golang.org/
+
+jobs:
+ test:
+ runs-on: ${{ matrix.os }}
+ timeout-minutes: 10
+ strategy:
+ fail-fast: false
+ matrix:
+ os:
+ - ubuntu-latest
+ - macos-latest
+ go:
+ - 1.16
+ - 1.17
+ - 1.18
+ - 1.19
+ steps:
+ - name: Checkout
+ uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # https://github.com/actions/checkout/releases/tag/v3.3.0
+ - name: Set up Go
+ uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # https://github.com/actions/setup-go/releases/tag/v3.5.0
+ with:
+ go-version: ${{ matrix.go }}
+ - name: Go mod download
+ run: go mod download -x
+ - name: Go mod verify
+ run: go mod verify
+ - name: Run tests
+ run: go test -v ./...
\ No newline at end of file