Skip to content

feat: add build-snapshot.sh script for local offline bundle testing #150

feat: add build-snapshot.sh script for local offline bundle testing

feat: add build-snapshot.sh script for local offline bundle testing #150

name: Functional Tests
on:
workflow_dispatch:
pull_request:
branches:
- main
push:
branches:
- main
jobs:
test-all:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -e ".[confluence,test]"
- name: Check dependency licenses
run: |
python -m pip install pip-licenses
# fastembed: PyPI metadata says "Other/Proprietary" but actual license is Apache-2.0
# svglib: LGPL-3.0 transitive dep of llama-index-readers-confluence (acceptable for Python dynamic imports)
pip-licenses --partial-match \
--fail-on="GPL;AGPL;SSPL;EUPL;Proprietary" \
--allow-only="MIT;BSD;Apache;ISC;Python Software Foundation;PSF;Mozilla Public License;MPL;Unlicense;HPND;Historical Permission Notice;CC0;Zlib;Python-2.0;CNRI-Python;Academic Free License;0BSD" \
--ignore-packages fastembed svglib docx2txt py_rust_stemmers \
|| (echo "ERROR: Dependency with disallowed license detected" && exit 1)
- name: Check release-bundle licenses
run: |
python -m venv /tmp/license-check-venv
/tmp/license-check-venv/bin/pip install --quiet --upgrade pip
/tmp/license-check-venv/bin/pip install --quiet \
-r requirements.txt \
"llama-index-readers-confluence>=0.6.0,<1" \
-c scripts/manylinux_2_34-constraints.txt
/tmp/license-check-venv/bin/pip install --quiet pip-licenses
/tmp/license-check-venv/bin/pip-licenses --partial-match \
--fail-on="GPL;AGPL;SSPL;EUPL;Proprietary" \
--allow-only="MIT;BSD;Apache;ISC;Python Software Foundation;PSF;Mozilla Public License;MPL;Unlicense;HPND;Historical Permission Notice;CC0;Zlib;Python-2.0;CNRI-Python;Academic Free License;0BSD" \
--ignore-packages fastembed svglib docx2txt py_rust_stemmers \
|| (echo "ERROR: Release bundle contains dependency with disallowed license" && exit 1)
rm -rf /tmp/license-check-venv
- name: Download models for offline tests
env:
DATA_DIR: ./test_data_dummy
STORAGE_DIR: ./test_storage_dummy
run: |
python -m chunksilo.index --download-models
- name: Run all functional tests
env:
DATA_DIR: ./test_data_dummy
STORAGE_DIR: ./test_storage_dummy
run: |
# Run all tests except rag_metrics (which has its own workflow)
# This automatically discovers new test files
pytest test/ -v --ignore=test/test_rag_metrics.py