From 2da74b7e68a107940a6f14597a622026e054b4d9 Mon Sep 17 00:00:00 2001 From: Steven Hartland Date: Fri, 23 Oct 2026 09:11:37 +0100 Subject: [PATCH] ci: add modern Go CI workflow --- .github/workflows/ci.yml | 48 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..f26460a --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,48 @@ +name: Go CI + +on: + push: + pull_request: + workflow_dispatch: + +permissions: + contents: read + +jobs: + test: + name: Go ${{ matrix.go-version }} + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + go-version: ["1.13", "stable"] + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + path: go/src/github.com/multiplay/statsd + - uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 + with: + go-version: ${{ matrix.go-version }} + check-latest: true + cache: false + - name: Test + working-directory: go/src/github.com/multiplay/statsd + env: + GO111MODULE: off + GOPATH: ${{ github.workspace }}/go + GOMAXPROCS: 2 + run: go test -p 2 -race -timeout=10s ./... + - name: Vet + working-directory: go/src/github.com/multiplay/statsd + env: + GO111MODULE: off + GOPATH: ${{ github.workspace }}/go + GOMAXPROCS: 2 + run: go vet -p 2 ./... + - name: Build + working-directory: go/src/github.com/multiplay/statsd + env: + GO111MODULE: off + GOPATH: ${{ github.workspace }}/go + GOMAXPROCS: 2 + run: go build -p 2 ./...