diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml new file mode 100644 index 0000000..6ad370b --- /dev/null +++ b/.github/workflows/go.yml @@ -0,0 +1,36 @@ +on: + workflow_call: + +permissions: + contents: read + +jobs: + go: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v7 + with: + persist-credentials: false + + - name: Setup Go + uses: actions/setup-go@v7 + with: + go-version: stable + + - name: Build + run: go build ./... + + - name: Test + run: go test -v -race ./... + + - name: golangci-lint + uses: golangci/golangci-lint-action@v9 + with: + version: latest + + - name: gofmt + run: test -z "$(gofmt -d . | tee /dev/stderr)" + + - name: go mod tidy + run: go mod tidy -diff