feat: enable passing runtime context to nodes/tools #1646
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Run Tests with Tika Server | |
on: | |
push: | |
# pull_request: | |
# workflow_dispatch: | |
env: | |
NATS_TOKEN: test | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
services: | |
tika: | |
image: apache/tika | |
ports: | |
- 9998:9998 | |
steps: | |
- name: 👀 Checkout code | |
uses: actions/checkout@v2 | |
- name: Setup apt cache | |
uses: actions/cache@v4 | |
with: | |
path: /var/cache/apt/archives | |
key: ${{ runner.os }}-apt-${{ hashFiles('/etc/apt/sources.list') }} | |
- name: 😭 Install system dependencies | |
run: | | |
sudo apt-get update && \ | |
sudo apt-get install -y libmagic-dev poppler-utils libreoffice tesseract-ocr pandoc | |
- name: 🔨 Install the latest version of rye | |
uses: eifinger/setup-rye@v4 | |
with: | |
enable-cache: true | |
working-directory: backend | |
- name: 🔽 Download and Install NATS Server | |
run: | | |
curl -L https://github.com/nats-io/nats-server/releases/download/v2.10.22/nats-server-v2.10.22-linux-amd64.zip -o nats-server.zip | |
unzip nats-server.zip -d nats-server && sudo cp nats-server/nats-server-v2.10.22-linux-amd64/nats-server /usr/bin | |
- name: 🛠️ Set up NATS arguments | |
run: | | |
nohup nats-server \ | |
--addr 0.0.0.0 \ | |
--port 4222 \ | |
--auth "$NATS_TOKEN" > nats.log 2>&1 & | |
- name: 🔍 Verify NATS Server is Running | |
run: | | |
sleep 1 # Give the server some time to start | |
if nc -zv localhost 4222; then | |
echo "✅ NATS Server is running on port 4222." | |
else | |
echo "❌ Failed to start NATS Server." | |
cat nats.log | |
exit 1 | |
fi | |
- name: 🔄 Sync dependencies | |
run: | | |
cd core | |
UV_INDEX_STRATEGY=unsafe-first-match rye sync --no-lock | |
- name: 🚀 Run tests | |
env: | |
TIKA_URL: http://localhost:9998/tika | |
OPENAI_API_KEY: this-is-a-test-key | |
run: | | |
cd core | |
rye test -p quivr_core -v |