46 lines
1.5 KiB
YAML
46 lines
1.5 KiB
YAML
name: neo4j_graphrag PR
|
|
on: pull_request
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
python-version: [ '3.10', '3.11', '3.12', '3.13', '3.14' ]
|
|
steps:
|
|
- name: Free up disk space (ubuntu-latest)
|
|
run: |
|
|
sudo rm -rf /usr/local/lib/android \
|
|
/usr/share/dotnet \
|
|
/opt/ghc \
|
|
/opt/hostedtoolcache
|
|
sudo apt-get clean || true
|
|
df -h
|
|
- 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: Set up uv
|
|
uses: astral-sh/setup-uv@v3
|
|
- name: Load cached venv
|
|
id: cached-venv
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: .venv
|
|
key: venv-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('**/uv.lock') }}
|
|
- name: Install dependencies
|
|
if: steps.cached-venv.outputs.cache-hit != 'true'
|
|
run: uv sync --frozen --all-extras --group dev
|
|
- name: Check format and linting
|
|
run: |
|
|
uv run ruff check .
|
|
uv run ruff format --check .
|
|
- name: Run strict mypy check
|
|
run: uv run mypy .
|
|
- name: Run unit tests and check coverage
|
|
run: |
|
|
uv run coverage run -m pytest tests/unit
|
|
uv run coverage report --fail-under=90
|