diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 00000000..08bd9a88 --- /dev/null +++ b/.github/workflows/test.yaml @@ -0,0 +1,26 @@ +on: [push, pull_request] +name: test +jobs: + test: + strategy: + fail-fast: false + matrix: + go-version: [1.18.x, 1.19.x] + platform: [ubuntu-latest, macos-latest, windows-latest] + runs-on: ${{ matrix.platform }} + steps: + - name: Install Go + uses: actions/setup-go@v1 + with: + go-version: ${{ matrix.go-version }} + - name: Checkout code + uses: actions/checkout@v1 + - name: Run tests + run: make test + - name: Send coverage + if: "matrix.platform == 'ubuntu-latest'" + env: + COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + GO111MODULE=off go get github.com/mattn/goveralls + $(go env GOPATH)/bin/goveralls -coverprofile=coverage.out -service=github