Skip to content

Merge branch 'main' of https://github.com/justserpapi/justserpapi-python #1

Merge branch 'main' of https://github.com/justserpapi/justserpapi-python

Merge branch 'main' of https://github.com/justserpapi/justserpapi-python #1

Workflow file for this run

name: validate-control-plane

Check failure on line 1 in .github/workflows/validate.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/validate.yml

Invalid workflow file

(Line: 32, Col: 13): Unrecognized named-value: 'secrets'. Located at position 56 within expression: hashFiles('openapi/justserpapi.openapi.json') == '' && secrets.JUSTSERPAPI_API_KEY != ''
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