From eca8e64a7b7ac2d0facc87850a820626cb27de16 Mon Sep 17 00:00:00 2001 From: Jeff Haynie Date: Wed, 12 Aug 2026 20:51:41 -0500 Subject: [PATCH 1/2] ci: add Go and Docker smoke workflows --- .github/workflows/ci.yml | 59 ++++++++++++++++++++++++++++++++++++++++ go.mod | 4 +-- go.sum | 2 ++ scripts/proxy-smoke.sh | 2 +- 4 files changed, 63 insertions(+), 4 deletions(-) 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..0abec68 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,59 @@ +name: CI + +on: + push: + pull_request: + workflow_dispatch: + +permissions: + contents: read + +concurrency: + group: ci-${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + test: + name: Go tests + runs-on: ubuntu-latest + timeout-minutes: 15 + + steps: + - name: Check out repository + uses: actions/checkout@v4 + + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version-file: go.mod + cache: true + + - name: Download modules + run: go mod download + + - name: Verify module files + run: go mod tidy && git diff --exit-code -- go.mod go.sum + + - name: Run tests + run: go test -race ./... + + - name: Run vet + run: go vet ./... + + smoke: + name: Docker smoke test + runs-on: ubuntu-latest + timeout-minutes: 30 + + steps: + - name: Check out repository + uses: actions/checkout@v4 + + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version-file: go.mod + cache: true + + - name: Run Docker smoke test + run: ./scripts/proxy-smoke.sh diff --git a/go.mod b/go.mod index 879ef33..057dcf4 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/agentuity/proxykit go 1.26.4 require ( - github.com/agentuity/go-common v0.0.0 + github.com/agentuity/go-common v1.0.246 github.com/aws/aws-sdk-go-v2 v1.41.12 github.com/aws/aws-sdk-go-v2/credentials v1.19.22 modernc.org/sqlite v1.54.0 @@ -31,5 +31,3 @@ require ( modernc.org/mathutil v1.7.1 // indirect modernc.org/memory v1.11.0 // indirect ) - -replace github.com/agentuity/go-common => /Users/jhaynie/code/agentuity/go-common diff --git a/go.sum b/go.sum index 125885b..88dd203 100644 --- a/go.sum +++ b/go.sum @@ -1,3 +1,5 @@ +github.com/agentuity/go-common v1.0.246 h1:F9gaJYTBlW9NoZhTUBt7FAlsGeZMAFqbIbFo/FfgxLs= +github.com/agentuity/go-common v1.0.246/go.mod h1:WUGQr4CuWqiAgtjcPldcmbwHc7b/6ta7UrcdjtZFc04= github.com/aws/aws-sdk-go-v2 v1.41.12 h1:DIKX2c31ekm9RA2D9FBj1EWXx++9AdAqRw+e78Tq2Ck= github.com/aws/aws-sdk-go-v2 v1.41.12/go.mod h1:27+ACypSLljLAEKsCYOmrjKh83vuTRkuAe9Uv/3A4bg= github.com/aws/aws-sdk-go-v2/credentials v1.19.22 h1:SHfH6wyPsEgG7fVsi5rQxWEt7tuIcN2PGhb1mTFv6tE= diff --git a/scripts/proxy-smoke.sh b/scripts/proxy-smoke.sh index 600114d..5c5070d 100755 --- a/scripts/proxy-smoke.sh +++ b/scripts/proxy-smoke.sh @@ -74,7 +74,7 @@ start_proxy() { start_minio() { docker run -d --rm \ --name "$minio_name" \ - -p 127.0.0.1::9000 \ + -p 9000 \ -e MINIO_ROOT_USER=minioadmin \ -e MINIO_ROOT_PASSWORD=minioadmin \ minio/minio:latest server /data >/dev/null From 4977c1fa9a9c5dc282509f7a63641e8bfa152831 Mon Sep 17 00:00:00 2001 From: Jeff Haynie Date: Wed, 12 Aug 2026 20:52:15 -0500 Subject: [PATCH 2/2] ci: avoid duplicate pull request runs --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0abec68..7011f22 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,6 +2,8 @@ name: CI on: push: + branches: + - main pull_request: workflow_dispatch: