Skip to content

Run file processors integration tests #1

Run file processors integration tests

Run file processors integration tests #1

name: File Processors Tests
run-name: Run file processors integration tests
on:
push:
branches:
- main
- 'release-[0-9]+.[0-9]+.x'
paths:
- 'src/llama_stack/providers/inline/file_processor/**'
- 'src/llama_stack/providers/registry/file_processors.py'
- 'tests/integration/file_processors/**'
- '.github/workflows/file-processors-tests.yml'
pull_request:
branches:
- main
- 'release-[0-9]+.[0-9]+.x'
paths:
- 'src/llama_stack/providers/inline/file_processor/**'
- 'src/llama_stack/providers/registry/file_processors.py'
- 'tests/integration/file_processors/**'
- '.github/workflows/file-processors-tests.yml'
merge_group:
branches:
- main
- 'release-[0-9]+.[0-9]+.x'
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/main' && github.run_id || github.ref }}
cancel-in-progress: true
jobs:
docling-tests:
name: Docling provider
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Install dependencies
uses: ./.github/actions/setup-runner
with:
python-version: "3.12"
- name: Install docling
run: uv pip install docling
- name: Start Llama Stack server with docling
run: |
uv run --no-sync llama stack run \
--providers "file_processors=inline::docling,files=inline::localfs" \
--port 8321 &
# Wait for server to be ready
for i in $(seq 1 60); do
if curl -sf http://localhost:8321/v1/health > /dev/null 2>&1; then
echo "Server is ready"
break
fi
if [ "$i" -eq 60 ]; then
echo "Server failed to start within 60 seconds"
exit 1
fi
sleep 2
done
- name: Run file processors integration tests
run: |
uv run --no-sync pytest -s -v \
tests/integration/file_processors/test_file_processors.py \
--stack-config="http://localhost:8321" \
--junitxml=pytest-report-file-processors.xml
- name: Upload test results
if: always()
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: test-results-file-processors
path: pytest-report-file-processors.xml
retention-days: 7