@@ -282,6 +282,163 @@ jobs:
282282 run : uv run pytest tests/unit
283283 # Tests run in parallel using pytest-xdist (-n auto configured in pyproject.toml)
284284
285+ # ============================================================================
286+ # Go SDK (sdk/golang)
287+ # ============================================================================
288+ go-sdk-lint :
289+ runs-on : ubuntu-latest
290+ defaults :
291+ run :
292+ working-directory : sdk/golang
293+ steps :
294+ - uses : actions/checkout@v4
295+
296+ - name : Set up Go
297+ uses : actions/setup-go@v5
298+ with :
299+ go-version : ' 1.23'
300+ cache-dependency-path : sdk/golang/go.sum
301+
302+ - name : Run go vet
303+ run : go vet ./...
304+
305+ - name : Run go fmt check
306+ run : |
307+ if [ -n "$(gofmt -l .)" ]; then
308+ echo "The following files are not formatted:"
309+ gofmt -l .
310+ exit 1
311+ fi
312+
313+ - name : Install staticcheck
314+ run : go install honnef.co/go/tools/cmd/staticcheck@latest
315+
316+ - name : Run staticcheck
317+ run : staticcheck ./...
318+
319+ go-sdk-test :
320+ runs-on : ubuntu-latest
321+ defaults :
322+ run :
323+ working-directory : sdk/golang
324+ strategy :
325+ matrix :
326+ go-version : ['1.22', '1.23']
327+ steps :
328+ - uses : actions/checkout@v4
329+
330+ - name : Set up Go
331+ uses : actions/setup-go@v5
332+ with :
333+ go-version : ${{ matrix.go-version }}
334+ cache-dependency-path : sdk/golang/go.sum
335+
336+ - name : Download dependencies
337+ run : go mod download
338+
339+ - name : Run tests with coverage
340+ run : go test -v -race -coverprofile=coverage.out -covermode=atomic ./...
341+
342+ - name : Upload coverage reports
343+ if : matrix.go-version == '1.23'
344+ uses : codecov/codecov-action@v5
345+ with :
346+ file : ./sdk/golang/coverage.out
347+ flags : go-sdk
348+ fail_ci_if_error : false
349+
350+ # ============================================================================
351+ # SyftHub Desktop (syfthub-desktop)
352+ # ============================================================================
353+ desktop-lint :
354+ runs-on : ubuntu-latest
355+ defaults :
356+ run :
357+ working-directory : syfthub-desktop
358+ steps :
359+ - uses : actions/checkout@v4
360+
361+ - name : Setup Node.js
362+ uses : actions/setup-node@v4
363+ with :
364+ node-version : lts/*
365+ cache : ' npm'
366+ cache-dependency-path : syfthub-desktop/frontend/package-lock.json
367+
368+ - name : Build frontend (required for go:embed)
369+ working-directory : syfthub-desktop/frontend
370+ run : |
371+ npm ci
372+ npm run build
373+
374+ - name : Set up Go
375+ uses : actions/setup-go@v5
376+ with :
377+ go-version : ' 1.23'
378+ cache-dependency-path : syfthub-desktop/go.sum
379+
380+ - name : Run go vet
381+ run : go vet ./...
382+
383+ - name : Run go fmt check
384+ run : |
385+ if [ -n "$(gofmt -l .)" ]; then
386+ echo "The following files are not formatted:"
387+ gofmt -l .
388+ exit 1
389+ fi
390+
391+ - name : Install staticcheck
392+ run : go install honnef.co/go/tools/cmd/staticcheck@latest
393+
394+ - name : Run staticcheck
395+ run : staticcheck ./...
396+
397+ desktop-test :
398+ runs-on : ubuntu-latest
399+ needs : [go-sdk-test] # Desktop depends on Go SDK
400+ defaults :
401+ run :
402+ working-directory : syfthub-desktop
403+ strategy :
404+ matrix :
405+ go-version : ['1.22', '1.23']
406+ steps :
407+ - uses : actions/checkout@v4
408+
409+ - name : Setup Node.js
410+ uses : actions/setup-node@v4
411+ with :
412+ node-version : lts/*
413+ cache : ' npm'
414+ cache-dependency-path : syfthub-desktop/frontend/package-lock.json
415+
416+ - name : Build frontend (required for go:embed)
417+ working-directory : syfthub-desktop/frontend
418+ run : |
419+ npm ci
420+ npm run build
421+
422+ - name : Set up Go
423+ uses : actions/setup-go@v5
424+ with :
425+ go-version : ${{ matrix.go-version }}
426+ cache-dependency-path : syfthub-desktop/go.sum
427+
428+ - name : Download dependencies
429+ run : go mod download
430+
431+ - name : Run tests with coverage
432+ run : go test -v -race -coverprofile=coverage.out -covermode=atomic ./...
433+
434+ - name : Upload coverage reports
435+ if : matrix.go-version == '1.23'
436+ uses : codecov/codecov-action@v5
437+ with :
438+ file : ./syfthub-desktop/coverage.out
439+ flags : desktop
440+ fail_ci_if_error : false
441+
285442 # ============================================================================
286443 # Frontend
287444 # ============================================================================
@@ -403,7 +560,7 @@ jobs:
403560 build-images :
404561 name : Build ${{ matrix.image }}
405562 if : github.ref == 'refs/heads/main' && github.event_name == 'push'
406- needs : [backend-lint, backend-test, aggregator-lint, aggregator-test, cli-lint, cli-test, python-sdk-lint, python-sdk-test, frontend-lint, frontend-test, frontend-build]
563+ needs : [backend-lint, backend-test, aggregator-lint, aggregator-test, cli-lint, cli-test, python-sdk-lint, python-sdk-test, go-sdk-lint, go-sdk-test, desktop-lint, desktop-test, frontend-lint, frontend-test, frontend-build]
407564 runs-on : ubuntu-latest
408565 permissions :
409566 contents : read
@@ -577,7 +734,7 @@ jobs:
577734 build-images-staging :
578735 name : Build ${{ matrix.image }} (Staging)
579736 if : github.ref == 'refs/heads/dev' && github.event_name == 'push'
580- needs : [backend-lint, backend-test, frontend-lint, frontend-test, frontend-build]
737+ needs : [backend-lint, backend-test, go-sdk-lint, go-sdk-test, desktop-lint, desktop-test, frontend-lint, frontend-test, frontend-build]
581738 runs-on : ubuntu-latest
582739 permissions :
583740 contents : read
0 commit comments