Merge branch 'main' of https://github.com/justserpapi/justserpapi-python #1
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: validate-control-plane | ||
|
Check failure on line 1 in .github/workflows/validate.yml
|
||
| on: | ||
| push: | ||
| branches: [main] | ||
| pull_request: | ||
| jobs: | ||
| validate: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: "3.11" | ||
| - uses: actions/setup-java@v4 | ||
| with: | ||
| distribution: temurin | ||
| java-version: "21" | ||
| - name: Install test dependencies | ||
| run: | | ||
| python -m pip install --upgrade pip | ||
| pip install -r test-requirements.txt | ||
| pip install -e . | ||
| - name: Run orchestration tests | ||
| run: python -m unittest discover -s tests -v | ||
| - name: Validate documentation examples | ||
| run: python scripts/sdkctl.py validate-examples | ||
| - name: Validate fixture spec | ||
| run: python scripts/sdkctl.py validate-spec --spec tests/fixtures/sample-openapi.json --skip-generator-validate | ||
| - name: Fetch canonical spec when it is not committed | ||
| if: ${{ hashFiles('openapi/justserpapi.openapi.json') == '' && secrets.JUSTSERPAPI_API_KEY != '' }} | ||
| env: | ||
| JUSTSERPAPI_API_KEY: ${{ secrets.JUSTSERPAPI_API_KEY }} | ||
| run: python scripts/sdkctl.py fetch-spec | ||
| - name: Validate canonical spec when present | ||
| run: | | ||
| if [ -f openapi/justserpapi.openapi.json ]; then | ||
| python scripts/sdkctl.py validate-spec | ||
| else | ||
| echo "Canonical spec not available; skipping." | ||
| fi | ||
| - name: Run breaking-change check when baseline exists | ||
| run: | | ||
| if [ -f openapi/justserpapi.openapi.json ] && [ -f openapi/baseline/justserpapi.openapi.json ]; then | ||
| python scripts/sdkctl.py breaking-check | ||
| else | ||
| echo "Baseline or head spec missing; skipping." | ||
| fi | ||