Add an optional Init func to the server #106
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
branches: [main] | |
pull_request: | |
name: Test | |
jobs: | |
test: | |
strategy: | |
matrix: | |
go-version: [1.21.x, 1.22.x] | |
platform: [ubuntu-latest, macos-latest, windows-latest] | |
runs-on: ${{ matrix.platform }} | |
steps: | |
- name: Install Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ matrix.go-version }} | |
- name: Install staticcheck | |
run: go install honnef.co/go/tools/cmd/staticcheck@latest | |
shell: bash | |
- name: Update PATH | |
run: echo "$(go env GOPATH)/bin" >> $GITHUB_PATH | |
shell: bash | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Fmt | |
if: matrix.platform != 'windows-latest' # :( | |
run: "diff <(gofmt -d .) <(printf '')" | |
shell: bash | |
- name: Vet | |
run: go vet ./... | |
- name: Staticcheck | |
run: staticcheck ./... | |
- name: Test | |
run: go test -race ./... |