Skip to content

fix(telemetry): send X-SDK-Language and X-Client-Type headers (#4) (#40) #14

fix(telemetry): send X-SDK-Language and X-Client-Type headers (#4) (#40)

fix(telemetry): send X-SDK-Language and X-Client-Type headers (#4) (#40) #14

Workflow file for this run

name: Live API Tests
# Runs the live/integration suite against the real OilPriceAPI.
# Gated on the OILPRICEAPI_TEST_KEY repo secret so forks (which don't have it)
# don't fail.
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch: {}
jobs:
live-tests:
name: Live API tests
runs-on: ubuntu-latest
# Only run when the secret is available (skips on forks / PRs from forks).
if: ${{ github.event_name == 'workflow_dispatch' || github.repository == 'OilpriceAPI/python-sdk' }}
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e '.[dev]'
- name: Run live integration tests
env:
OILPRICEAPI_TEST_KEY: ${{ secrets.OILPRICEAPI_TEST_KEY }}
run: |
if [ -z "$OILPRICEAPI_TEST_KEY" ]; then
echo "OILPRICEAPI_TEST_KEY not set; skipping live tests."
exit 0
fi
pytest tests/integration -m live --no-cov -v