diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..7e62035 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,21 @@ +name: test +on: [push, pull_request] + +permissions: + contents: read + +jobs: + test: + strategy: + matrix: + go-version: [1.18.x, 1.19.x] + os: [ubuntu-latest, windows-latest] + runs-on: ${{ matrix.os }} + timeout-minutes: 10 + steps: + - uses: actions/setup-go@v3 + with: + go-version: ${{ matrix.go-version }} + - uses: actions/checkout@v3 + - name: Test + run: go test -v ./... diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml new file mode 100644 index 0000000..ad6c2f8 --- /dev/null +++ b/.github/workflows/validate.yml @@ -0,0 +1,25 @@ +name: validate +on: [push, pull_request] + +permissions: + contents: read + +jobs: + linters: + strategy: + matrix: + go-version: [1.19.x] + os: [ubuntu-latest] + runs-on: ${{ matrix.os }} + timeout-minutes: 10 + steps: + - uses: actions/setup-go@v3 + with: + go-version: ${{ matrix.go-version }} + - uses: actions/checkout@v3 + - name: lint + uses: golangci/golangci-lint-action@v3 + with: + version: v1.49 + # TODO use --out-format=junit-xml and store artifacts + args: --print-resources-usage --timeout=10m --verbose diff --git a/publisher_test.go b/publisher_test.go index 8aa65ca..7d2bffe 100644 --- a/publisher_test.go +++ b/publisher_test.go @@ -112,7 +112,7 @@ func TestPubSubRace(t *testing.T) { } }) for _, s := range subs { - s.Wait() + _ = s.Wait() } }