quivr/.github/workflows/backend-core-tests.yml
Stan Girard 05d7dff91b feat: Update health check command in backend-core-tests.yml
The health check command in the `backend-core-tests.yml` GitHub Actions workflow file has been updated to include a `--max-time` option with a value of 5 seconds. This change ensures that the health check fails if the Tika server does not respond within the specified time limit.
2024-07-09 18:43:32 +02:00

48 lines
989 B
YAML

name: Run Tests with Tika Server
on:
push:
paths:
- 'backend/core/**'
pull_request:
paths:
- 'backend/core/**'
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
services:
tika:
image: apache/tika
ports:
- 9998:9998
options: >-
--health-cmd="curl --fail http://localhost:9998/tika --max-time 5 || exit 1"
--health-interval=30s
--health-timeout=10s
--health-retries=10
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.11'
- name: Install dependencies
run: |
cd backend/core
python -m pip install --upgrade pip
pip install poetry
poetry install -E base
- name: Run tests
env:
TIKA_URL: http://localhost:9998/tika
run: |
cd backend/core
poetry run pytest tests