|
| 1 | +name: CI |
| 2 | + |
| 3 | +on: |
| 4 | + pull_request: |
| 5 | + push: |
| 6 | + branches: [main] |
| 7 | + |
| 8 | +concurrency: |
| 9 | + group: ci-${{ github.workflow }}-${{ github.ref }} |
| 10 | + cancel-in-progress: true |
| 11 | + |
| 12 | +permissions: |
| 13 | + contents: read |
| 14 | + |
| 15 | +jobs: |
| 16 | + lint: |
| 17 | + runs-on: ubuntu-latest |
| 18 | + timeout-minutes: 10 |
| 19 | + steps: |
| 20 | + - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 |
| 21 | + with: |
| 22 | + persist-credentials: false |
| 23 | + - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 |
| 24 | + with: |
| 25 | + python-version: '3.13' |
| 26 | + - run: python -m pip install --upgrade pip |
| 27 | + - run: pip install -e ".[dev]" |
| 28 | + - name: Ruff |
| 29 | + run: ruff check . |
| 30 | + |
| 31 | + test: |
| 32 | + runs-on: ubuntu-latest |
| 33 | + timeout-minutes: 10 |
| 34 | + strategy: |
| 35 | + fail-fast: false |
| 36 | + matrix: |
| 37 | + python-version: ['3.10', '3.11', '3.12', '3.13'] |
| 38 | + steps: |
| 39 | + - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 |
| 40 | + with: |
| 41 | + persist-credentials: false |
| 42 | + - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 |
| 43 | + with: |
| 44 | + python-version: ${{ matrix.python-version }} |
| 45 | + - run: python -m pip install --upgrade pip |
| 46 | + # Install the framework extras so the adapter handler tests actually run |
| 47 | + # (instead of skipping). langchain-core covers the LangChain handler tests. |
| 48 | + - run: pip install -e ".[dev,langchain]" |
| 49 | + - name: Pytest |
| 50 | + run: pytest -q |
| 51 | + |
| 52 | + test-bare: |
| 53 | + # Locks the dependency-free contract: the package and its test suite must |
| 54 | + # work with NO framework extra installed (handler tests skip cleanly, no |
| 55 | + # import errors). This is what publish.yml runs before releasing. |
| 56 | + runs-on: ubuntu-latest |
| 57 | + timeout-minutes: 10 |
| 58 | + steps: |
| 59 | + - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 |
| 60 | + with: |
| 61 | + persist-credentials: false |
| 62 | + - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 |
| 63 | + with: |
| 64 | + python-version: '3.13' |
| 65 | + - run: python -m pip install --upgrade pip |
| 66 | + - run: pip install -e ".[dev]" |
| 67 | + - name: Pytest (no extras) |
| 68 | + run: pytest -q |
0 commit comments