docs: embedder-segment quick start + fix weekly-health workflow (#44)… #23
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: 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 |