Expand integration tests, fix transport response reading bug #60
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: Generated code check | |
| on: | |
| pull_request: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| jobs: | |
| staleness: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| with: | |
| persist-credentials: false | |
| - uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0 | |
| with: | |
| python-version: "3.12" | |
| enable-cache: false | |
| - name: Prepare spec | |
| run: | | |
| set -euo pipefail | |
| if [[ -f openapi-overlay.yaml ]]; then | |
| uvx oas-patch==0.6.0 overlay openapi.json openapi-overlay.yaml -o /tmp/patched-spec.json | |
| else | |
| cp openapi.json /tmp/patched-spec.json | |
| fi | |
| - name: Regenerate client | |
| run: | | |
| uvx openapi-python-client==0.28.3 generate \ | |
| --path /tmp/patched-spec.json \ | |
| --meta none \ | |
| --config openapi-python-client-config.yaml \ | |
| --custom-template-path custom-templates \ | |
| --output-path ionq_core \ | |
| --overwrite | |
| - name: Check for uncommitted changes | |
| run: | | |
| if [[ -n "$(git status --porcelain ionq_core/)" ]]; then | |
| echo "::error::Generated code is out of date. Run the generator and commit the results." | |
| git diff ionq_core/ | |
| exit 1 | |
| fi |