Skip to content

Commit

Permalink
add cicd test files. must uncomment once we start project
Browse files Browse the repository at this point in the history
  • Loading branch information
a-s-g93 committed Aug 13, 2024
1 parent faeda85 commit 25bd76d
Show file tree
Hide file tree
Showing 2 changed files with 118 additions and 0 deletions.
73 changes: 73 additions & 0 deletions .github/workflows/pr-integration-tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# # 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
45 changes: 45 additions & 0 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# # Modified from Neo4j GenAI Python Library pr.yaml file
# name: ps-genai-agents PR
# on: pull_request

# jobs:
# test:
# runs-on: ubuntu-latest
# strategy:
# matrix:
# python-version: [ '3.10', '3.11', '3.12' ]
# steps:
# - name: Check out repository code
# uses: actions/checkout@v4
# - 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: venv-${{ runner.os }}-${{ 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: Check format and linting
# run: |
# poetry run ruff check --select I .
# poetry run ruff format --check .
# - name: Run strict mypy check
# run: poetry run mypy --strict --ignore-missing-imports --allow-subclassing-any --allow-untyped-calls .
# - name: Run unit tests and check coverage
# run: |
# poetry run coverage run -m pytest tests/unit

0 comments on commit 25bd76d

Please sign in to comment.