Skip to content

Scheduled SDK Synthetic #481

Scheduled SDK Synthetic

Scheduled SDK Synthetic #481

Workflow file for this run

name: Scheduled SDK Synthetic
on:
schedule:
- cron: "17 * * * *"
workflow_dispatch: {}
permissions:
contents: read
concurrency:
group: python-sdk-synthetic
cancel-in-progress: false
jobs:
health-check:
name: Latest + bounded history
if: github.ref == format('refs/heads/{0}', github.event.repository.default_branch)
runs-on: ubuntu-latest
timeout-minutes: 10
env:
OILPRICEAPI_KEY: ${{ secrets.OILPRICEAPI_TEST_KEY }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7
with:
python-version: "3.12"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e '.[dev]'
- name: Keyless demo smoke (always runs)
run: pytest tests/integration/test_demo_contract.py -m live --no-cov -v --timeout=60
- name: Require monitor credential
run: |
if [ -z "$OILPRICEAPI_KEY" ]; then
echo "::error::OILPRICEAPI_TEST_KEY is empty or unset"
exit 1
fi
- name: Run bounded customer-path synthetic
run: python scripts/synthetic_monitor.py --output artifacts/sdk-health.json
- name: Publish receipt in job summary
if: always() && hashFiles('artifacts/sdk-health.json') != ''
run: |
echo '### Python SDK synthetic receipt' >> "$GITHUB_STEP_SUMMARY"
echo '```json' >> "$GITHUB_STEP_SUMMARY"
cat artifacts/sdk-health.json >> "$GITHUB_STEP_SUMMARY"
echo '```' >> "$GITHUB_STEP_SUMMARY"
- name: Upload 30-day receipt
if: always() && hashFiles('artifacts/sdk-health.json') != ''
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: sdk-health-${{ github.run_id }}
path: artifacts/sdk-health.json
retention-days: 30