Files
hatchet/.github/workflows/sdk-go.yml
T
matt 704c173da7 Fix: filter + pagination state handling hack (#2682)
* fix: filter + pagination state handling hack

* fix: use location.pathname

* update to go 1.25

* fix: add version to sdk-go.yml

---------

Co-authored-by: Alexander Belanger <alexander@hatchet.run>
2025-12-18 12:18:38 -05:00

52 lines
1.2 KiB
YAML

name: go
on:
pull_request:
paths:
- ".github/**"
- "api/**"
- "api-contracts/**"
- "internal/**"
- "pkg/**"
- "sdks/go/**"
push:
branches:
- main
paths:
- "sdks/go/**"
defaults:
run:
working-directory: ./sdks/go
jobs:
compile:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup Go
uses: actions/setup-go@v6
with:
go-version: "1.25"
- name: Compile Go SDK examples
run: |
# Find all directories with go.mod files
for dir in $(find examples -name "go.mod" -exec dirname {} \;); do
echo "Compiling $dir (has go.mod)"
cd "$dir"
go build .
cd - > /dev/null
done
# Find directories with main.go but no go.mod (use parent's go.mod)
for dir in $(find examples -name "main.go" -exec dirname {} \; | while read d; do
if [ ! -f "$d/go.mod" ]; then
echo "$d"
fi
done | sort -u); do
echo "Compiling $dir (uses parent go.mod)"
cd "$dir"
go build .
cd - > /dev/null
done