| 1 | name: run-tests |
| 2 | |
| 3 | description: "Install lance wheel and run unit tests" |
| 4 | inputs: |
| 5 | python-minor-version: |
| 6 | required: true |
| 7 | description: "8 9 10 11 12" |
| 8 | integration: |
| 9 | required: false |
| 10 | description: "Run integration tests" |
| 11 | default: "false" |
| 12 | runs: |
| 13 | using: "composite" |
| 14 | steps: |
| 15 | - name: Install lancedb |
| 16 | shell: bash |
| 17 | run: | |
| 18 | pip3 install --extra-index-url https://pypi.fury.io/lancedb/ $(ls target/wheels/lancedb-*.whl)[tests,dev] |
| 19 | - name: Setup localstack for integration tests |
| 20 | if: ${{ inputs.integration == 'true' }} |
| 21 | shell: bash |
| 22 | working-directory: . |
| 23 | run: docker compose up --detach --wait |
| 24 | - name: pytest (with integration) |
| 25 | shell: bash |
| 26 | if: ${{ inputs.integration == 'true' }} |
| 27 | run: pytest -m "not slow" -x -v --durations=30 python/python/tests |
| 28 | - name: pytest (no integration tests) |
| 29 | shell: bash |
| 30 | if: ${{ inputs.integration != 'true' }} |
| 31 | run: pytest -m "not slow and not s3_test" -x -v --durations=30 python/python/tests |