diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..16bc5ae --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,41 @@ +name: testing + +on: + push: + branches: ["master"] + pull_request: + branches: ["master"] + +permissions: + contents: read + +jobs: + test: + strategy: + fail-fast: true + matrix: + os: [ubuntu-latest, macos-latest] + go: ["1.16", "1.17", "1.18", "1.19"] + include: + - go: "1.16" + GO_VERSION: "~1.16.0" + - go: "1.17" + GO_VERSION: "~1.17.0" + - go: "1.18" + GO_VERSION: "~1.18.0" + - go: "1.19" + GO_VERSION: "~1.19.0" + runs-on: ${{ matrix.os }} + + steps: + - name: Set up Go ${{ matrix.go }} + uses: actions/setup-go@v3 + with: + go-version: ${{ matrix.GO_VERSION }} + check-latest: true + + - name: Check out the source code + uses: actions/checkout@v3 + + - name: Run tests + run: go test -v -race