Patient journey synthea #8
This file contains 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
# Modified from Neo4j GenAI Python Library pr-e2e-tests.yaml file | |
name: 'ps-genai-agents Integration Tests' | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened, ready_for_review] | |
branches: | |
- main | |
env: | |
NEO4J_USERNAME: neo4j | |
NEO4J_PASSWORD: password | |
NEO4J_URI: bolt://localhost:7687 | |
NEO4J_DATABASE: neo4j | |
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
jobs: | |
integration-tests: | |
runs-on: ubuntu-latest | |
strategy: | |
max-parallel: 6 | |
matrix: | |
python-version: ['3.10', '3.11', '3.12'] | |
neo4j-version: | |
- 5 | |
neo4j-edition: | |
- enterprise | |
services: | |
neo4j: | |
image: neo4j:${{ matrix.neo4j-version }}-${{ matrix.neo4j-edition }} | |
env: | |
NEO4J_AUTH: neo4j/password | |
NEO4J_ACCEPT_LICENSE_AGREEMENT: 'eval' | |
ports: | |
- 7687:7687 | |
- 7474:7474 | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v4 | |
- name: Docker Prune | |
run: | | |
docker system prune -af | |
docker volume prune -f | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
with: | |
virtualenvs-create: true | |
virtualenvs-in-project: true | |
installer-parallel: true | |
- name: Set Python version for Poetry | |
run: poetry env use python${{ matrix.python-version }} | |
- name: Load cached venv | |
id: cached-poetry-dependencies | |
uses: actions/cache@v4 | |
with: | |
path: .venv | |
key: ${{ runner.os }}-venv-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }} | |
- name: Install dependencies | |
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | |
run: poetry install --no-interaction --no-root | |
- name: Install root project | |
run: poetry install --no-interaction | |
- name: Install dependencies | |
run: poetry install --with dev | |
- name: Run tests | |
shell: bash | |
run: | | |
poetry run pytest tests/integration |