|
| 1 | +name: 🔍 Test Inspect integration |
| 2 | + |
| 3 | +# Runs only when the integration package itself changes, or when the Python SDK |
| 4 | +# it depends on changes (a SDK change — including a version bump — can break the |
| 5 | +# integration, so we re-verify here too). |
| 6 | +on: |
| 7 | + push: |
| 8 | + branches: |
| 9 | + - main |
| 10 | + paths: |
| 11 | + - "integrations/inspect-python/**" |
| 12 | + - "sdks/python/**" |
| 13 | + - "sdks/settings/**" |
| 14 | + - ".github/workflows/test-inspect-python.yml" |
| 15 | + pull_request: |
| 16 | + paths: |
| 17 | + - "integrations/inspect-python/**" |
| 18 | + - "sdks/python/**" |
| 19 | + - "sdks/settings/**" |
| 20 | + - ".github/workflows/test-inspect-python.yml" |
| 21 | + |
| 22 | +permissions: |
| 23 | + contents: read |
| 24 | + |
| 25 | +concurrency: |
| 26 | + group: ${{ github.workflow }}-${{ github.ref }} |
| 27 | + cancel-in-progress: true |
| 28 | + |
| 29 | +jobs: |
| 30 | + verify: |
| 31 | + name: Verify (Python ${{ matrix.python-version }}) |
| 32 | + runs-on: ubuntu-latest |
| 33 | + strategy: |
| 34 | + matrix: |
| 35 | + python-version: ["3.10", "3.11", "3.12", "3.13"] |
| 36 | + steps: |
| 37 | + - name: Checkout |
| 38 | + uses: actions/checkout@v6 |
| 39 | + |
| 40 | + - name: Set up Python ${{ matrix.python-version }} |
| 41 | + uses: actions/setup-python@v6 |
| 42 | + with: |
| 43 | + python-version: ${{ matrix.python-version }} |
| 44 | + |
| 45 | + - name: Install in-repo SDK + integration package |
| 46 | + # Install the SDK from source first: the integration relies on |
| 47 | + # LLMGeneratorProtocol (SDK >=0.3.0), which is not yet on PyPI. The |
| 48 | + # editable install satisfies the >=0.2.0 floor while providing the |
| 49 | + # unreleased protocol code, so CI tests against current monorepo state. |
| 50 | + run: | |
| 51 | + python -m pip install --upgrade pip |
| 52 | + pip install -e ./sdks/python |
| 53 | + pip install -e "./integrations/inspect-python[dev]" |
| 54 | +
|
| 55 | + - name: Lint |
| 56 | + working-directory: integrations/inspect-python |
| 57 | + run: | |
| 58 | + python -m ruff check . |
| 59 | + python -m ruff format --check . |
| 60 | +
|
| 61 | + - name: Test |
| 62 | + working-directory: integrations/inspect-python |
| 63 | + run: python -m pytest |
0 commit comments