fix: handle async 202 job polling and nested graph response (#16) #15
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: Architecture | |
| on: | |
| pull_request: | |
| paths: | |
| - 'internal/**' | |
| - 'cmd/**' | |
| - 'main.go' | |
| - 'scripts/check-architecture/**' | |
| push: | |
| branches: [main] | |
| paths: | |
| - 'internal/**' | |
| - 'cmd/**' | |
| - 'main.go' | |
| jobs: | |
| vertical-slice: | |
| name: vertical slice check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: go.mod | |
| cache: true | |
| - name: Check vertical slice architecture | |
| env: | |
| SUPERMODEL_API_KEY: ${{ secrets.SUPERMODEL_API_KEY }} | |
| run: | | |
| if [ -z "$SUPERMODEL_API_KEY" ]; then | |
| echo "::warning::SUPERMODEL_API_KEY not set — skipping architecture check (fork PR?)" | |
| exit 0 | |
| fi | |
| output=$(go run ./scripts/check-architecture 2>&1) | |
| exit_code=$? | |
| echo "$output" | |
| if [ $exit_code -ne 0 ]; then | |
| if echo "$output" | grep -q "HTTP 4"; then | |
| echo "::warning::Architecture check skipped — API returned an error (transient or key issue)" | |
| exit 0 | |
| fi | |
| exit $exit_code | |
| fi |