mirror of
https://github.com/microsoft/graphrag.git
synced 2026-01-14 00:57:23 +08:00
Some checks are pending
gh-pages / build (push) Waiting to run
Python CI / python-ci (ubuntu-latest, 3.10) (push) Waiting to run
Python CI / python-ci (ubuntu-latest, 3.11) (push) Waiting to run
Python CI / python-ci (windows-latest, 3.10) (push) Waiting to run
Python CI / python-ci (windows-latest, 3.11) (push) Waiting to run
Python Integration Tests / python-ci (ubuntu-latest, 3.10) (push) Waiting to run
Python Integration Tests / python-ci (windows-latest, 3.10) (push) Waiting to run
Python Notebook Tests / python-ci (ubuntu-latest, 3.10) (push) Waiting to run
Python Notebook Tests / python-ci (windows-latest, 3.10) (push) Waiting to run
Python Publish (pypi) / Upload release to PyPI (push) Waiting to run
Python Smoke Tests / python-ci (ubuntu-latest, 3.10) (push) Waiting to run
Python Smoke Tests / python-ci (windows-latest, 3.10) (push) Waiting to run
Spellcheck / spellcheck (push) Waiting to run
* Initial plan * Switch from Poetry to uv for package management Co-authored-by: jgbradley1 <654554+jgbradley1@users.noreply.github.com> * Clean up build artifacts and update gitignore Co-authored-by: jgbradley1 <654554+jgbradley1@users.noreply.github.com> * remove build artifacts * remove hardcoded version string * fix calls to pip in cicd * Update gh-pages.yml workflow to use uv instead of Poetry Co-authored-by: jgbradley1 <654554+jgbradley1@users.noreply.github.com> * ruff formatting fixes * update cicd workflow with latest uv action * fix command to retrieve package version * update development instructions * remove Poetry references * Replace deprecated azuright action with npm-based Azurite installation Co-authored-by: jgbradley1 <654554+jgbradley1@users.noreply.github.com> * skip api version check for azurite * add semversioner file * update more changes from switching to UV * Migrate unified-search-app from Poetry to uv package management Co-authored-by: jgbradley1 <654554+jgbradley1@users.noreply.github.com> * minor typo update * minor Dockerfile update * update cicd thresholds * update pytest thresholds * ruff fixes * ruff fixes * remove legacy npm settings that no longer apply * Update Unified Search App Readme --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: jgbradley1 <654554+jgbradley1@users.noreply.github.com> Co-authored-by: Josh Bradley <joshbradley@microsoft.com> Co-authored-by: Alonso Guevara <alonsog@microsoft.com>
110 lines
3.2 KiB
YAML
110 lines
3.2 KiB
YAML
name: Python Smoke Tests
|
|
on:
|
|
push:
|
|
branches:
|
|
- "**/main" # match branches like feature/main
|
|
- "main" # match the main branch
|
|
pull_request:
|
|
types:
|
|
- opened
|
|
- reopened
|
|
- synchronize
|
|
- ready_for_review
|
|
branches:
|
|
- "**/main"
|
|
- "main"
|
|
paths-ignore:
|
|
- "**/*.md"
|
|
- ".semversioner/**"
|
|
|
|
permissions:
|
|
contents: read
|
|
pull-requests: read
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
# Only run the for the latest commit
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
python-ci:
|
|
# skip draft PRs
|
|
if: github.event.pull_request.draft == false
|
|
strategy:
|
|
matrix:
|
|
python-version: ["3.10"]
|
|
os: [ubuntu-latest, windows-latest]
|
|
fail-fast: false # Continue running all jobs even if one fails
|
|
env:
|
|
DEBUG: 1
|
|
GRAPHRAG_LLM_TYPE: "azure_openai_chat"
|
|
GRAPHRAG_EMBEDDING_TYPE: "azure_openai_embedding"
|
|
GRAPHRAG_API_KEY: ${{ secrets.OPENAI_API_KEY }}
|
|
GRAPHRAG_API_BASE: ${{ secrets.GRAPHRAG_API_BASE }}
|
|
GRAPHRAG_API_VERSION: ${{ secrets.GRAPHRAG_API_VERSION }}
|
|
GRAPHRAG_LLM_DEPLOYMENT_NAME: ${{ secrets.GRAPHRAG_LLM_DEPLOYMENT_NAME }}
|
|
GRAPHRAG_EMBEDDING_DEPLOYMENT_NAME: ${{ secrets.GRAPHRAG_EMBEDDING_DEPLOYMENT_NAME }}
|
|
GRAPHRAG_LLM_MODEL: ${{ secrets.GRAPHRAG_LLM_MODEL }}
|
|
GRAPHRAG_EMBEDDING_MODEL: ${{ secrets.GRAPHRAG_EMBEDDING_MODEL }}
|
|
# We have Windows + Linux runners in 3.10, so we need to divide the rate limits by 2
|
|
GRAPHRAG_LLM_TPM: 200_000 # 400_000 / 2
|
|
GRAPHRAG_LLM_RPM: 1_000 # 2_000 / 2
|
|
GRAPHRAG_EMBEDDING_TPM: 225_000 # 450_000 / 2
|
|
GRAPHRAG_EMBEDDING_RPM: 1_000 # 2_000 / 2
|
|
# Azure AI Search config
|
|
AZURE_AI_SEARCH_URL_ENDPOINT: ${{ secrets.AZURE_AI_SEARCH_URL_ENDPOINT }}
|
|
AZURE_AI_SEARCH_API_KEY: ${{ secrets.AZURE_AI_SEARCH_API_KEY }}
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: dorny/paths-filter@v3
|
|
id: changes
|
|
with:
|
|
filters: |
|
|
python:
|
|
- 'graphrag/**/*'
|
|
- 'uv.lock'
|
|
- 'pyproject.toml'
|
|
- '**/*.py'
|
|
- '**/*.toml'
|
|
- '**/*.ipynb'
|
|
- '.github/workflows/python*.yml'
|
|
- 'tests/smoke/**/*'
|
|
|
|
- name: Set up Python ${{ matrix.python-version }}
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
|
|
- name: Install uv
|
|
uses: astral-sh/setup-uv@v6
|
|
|
|
- name: Install dependencies
|
|
shell: bash
|
|
run: |
|
|
uv sync --extra dev
|
|
uv pip install gensim
|
|
|
|
- name: Build
|
|
run: |
|
|
uv build
|
|
|
|
- name: Install and start Azurite
|
|
shell: bash
|
|
run: |
|
|
npm install -g azurite
|
|
azurite --silent --skipApiVersionCheck --location /tmp/azurite --debug /tmp/azurite-debug.log &
|
|
|
|
- name: Smoke Test
|
|
if: steps.changes.outputs.python == 'true'
|
|
run: |
|
|
uv run poe test_smoke
|
|
|
|
- uses: actions/upload-artifact@v4
|
|
if: always()
|
|
with:
|
|
name: smoke-test-artifacts-${{ matrix.python-version }}-${{ runner.os }}
|
|
path: tests/fixtures/*
|