ci: workflow ecosystem remediation — auto-discovery, config SSoT, coverage/e2e enforcement, test fixes, 16-core provider runs #230
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Go SDK | |
| on: | |
| push: | |
| branches: [ main, develop ] | |
| paths: | |
| - 'sdk/go/**' | |
| - 'go.mod' | |
| - 'go.sum' | |
| - '.github/workflows/sdk-go.yml' | |
| pull_request: | |
| branches: [ main, develop ] | |
| paths: | |
| - 'sdk/go/**' | |
| - 'go.mod' | |
| - 'go.sum' | |
| - '.github/workflows/sdk-go.yml' | |
| schedule: | |
| - cron: '0 2 * * *' | |
| permissions: | |
| contents: read | |
| # Per-ref concurrency: prevents stale SDK CI runs from blocking a newer push. | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build-and-test: | |
| name: Go SDK Build & Test | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| - name: Set up Go | |
| uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6 | |
| with: | |
| go-version-file: go.mod | |
| - name: Build | |
| run: make sdk-go-build | |
| - name: Test | |
| run: make sdk-go-test | |
| check-drift: | |
| name: Check Generated Code Drift | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| # Only run drift check when openapi.json changes | |
| if: github.event_name == 'pull_request' | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| - name: Set up Go | |
| uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6 | |
| with: | |
| go-version-file: go.mod | |
| - name: Install ogen | |
| run: go install github.com/ogen-go/ogen/cmd/ogen@v1.19.0 | |
| - name: Regenerate SDK | |
| run: make sdk-go-generate | |
| - name: Check for drift | |
| run: | | |
| if ! git diff --exit-code sdk/go/; then | |
| echo "Generated Go SDK code is out of sync with openapi.json." | |
| echo "Run 'make sdk-go-generate' and commit the result." | |
| exit 1 | |
| fi |