forked from llamastack/llama-stack
-
Notifications
You must be signed in to change notification settings - Fork 0
84 lines (74 loc) · 2.5 KB
/
file-processors-tests.yml
File metadata and controls
84 lines (74 loc) · 2.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
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