Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 80 additions & 0 deletions .azure-pipelines/python-smoke-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# Python Smoke Tests (Azure DevOps)
#
# Runs the smoke tests against Azure OpenAI with Entra ID auth (no API key).
# These run in Azure DevOps because GitHub-hosted Actions runners cannot obtain
# Entra ID tokens for the tenant that hosts the Azure OpenAI resource.
#
# Pipeline variables (set in Azure DevOps, not in this file):
# GRAPHRAG_API_BASE - Azure OpenAI endpoint
# AZURE_AI_SEARCH_URL_ENDPOINT - Azure AI Search endpoint (Entra ID auth, no key)

trigger:
branches:
include:
- main
- "*/main" # match branches like feature/main
paths:
exclude:
- "**/*.md"
- .semversioner

pr:
autoCancel: true # only run for the latest commit
drafts: false # skip draft PRs
branches:
include:
- main
- "*/main"
paths:
exclude:
- "**/*.md"
- .semversioner

variables:
pythonVersion: "3.13"

jobs:
- job: smoke_tests
displayName: Smoke tests
timeoutInMinutes: 90
strategy:
matrix:
ubuntu:
vmImage: ubuntu-latest
windows:
vmImage: windows-latest
pool:
vmImage: $(vmImage)
steps:
- task: UsePythonVersion@0
displayName: Set up Python $(pythonVersion)
inputs:
versionSpec: $(pythonVersion)

- script: python -m pip install uv
displayName: Install uv

- script: uv sync --all-packages
displayName: Install dependencies

- script: uv build --all-packages
displayName: Build

# The fixtures use Entra ID auth for Azure OpenAI and Azure AI Search;
# DefaultAzureCredential picks up the Azure CLI login made by this task.
- task: AzureCLI@2
displayName: Smoke Test
inputs:
azureSubscription: graphrag-oss-ci
scriptType: pscore
scriptLocation: inlineScript
inlineScript: uv run poe test_smoke
env:
DEBUG: 1
GRAPHRAG_API_BASE: $(GRAPHRAG_API_BASE)
AZURE_AI_SEARCH_URL_ENDPOINT: $(AZURE_AI_SEARCH_URL_ENDPOINT)

- publish: tests/fixtures
artifact: smoke-test-artifacts-$(Agent.OS)
displayName: Upload smoke test artifacts
condition: always()
97 changes: 0 additions & 97 deletions .github/workflows/python-smoke-tests.yml

This file was deleted.

4 changes: 2 additions & 2 deletions tests/fixtures/min-csv/settings.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
completion_models:
default_completion_model:
model_provider: azure
api_key: ${GRAPHRAG_API_KEY}
auth_method: azure_managed_identity
api_base: ${GRAPHRAG_API_BASE}
api_version: "2025-04-01-preview"
model: gpt-4.1
Expand All @@ -19,7 +19,7 @@ completion_models:
embedding_models:
default_embedding_model:
model_provider: azure
api_key: ${GRAPHRAG_API_KEY}
auth_method: azure_managed_identity
api_base: ${GRAPHRAG_API_BASE}
api_version: "2025-04-01-preview"
model: text-embedding-3-large
Expand Down
5 changes: 2 additions & 3 deletions tests/fixtures/text/settings.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
completion_models:
default_completion_model:
model_provider: azure
api_key: ${GRAPHRAG_API_KEY}
auth_method: azure_managed_identity
api_base: ${GRAPHRAG_API_BASE}
api_version: "2025-04-01-preview"
model: gpt-4.1
Expand All @@ -19,7 +19,7 @@ completion_models:
embedding_models:
default_embedding_model:
model_provider: azure
api_key: ${GRAPHRAG_API_KEY}
auth_method: azure_managed_identity
api_base: ${GRAPHRAG_API_BASE}
api_version: "2025-04-01-preview"
model: text-embedding-3-large
Expand All @@ -38,7 +38,6 @@ embedding_models:
vector_store:
type: "azure_ai_search"
url: ${AZURE_AI_SEARCH_URL_ENDPOINT}
api_key: ${AZURE_AI_SEARCH_API_KEY}
container_name: "simple_text_ci"

table_provider:
Expand Down
2 changes: 0 additions & 2 deletions tests/smoke/test_fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,6 @@ def __run_query(self, root: Path, query_config: dict[str, str]):
**os.environ,
"BLOB_STORAGE_CONNECTION_STRING": WELL_KNOWN_AZURITE_CONNECTION_STRING,
"LOCAL_BLOB_STORAGE_CONNECTION_STRING": WELL_KNOWN_AZURITE_CONNECTION_STRING,
"AZURE_AI_SEARCH_URL_ENDPOINT": os.getenv("AZURE_AI_SEARCH_URL_ENDPOINT"),
"AZURE_AI_SEARCH_API_KEY": os.getenv("AZURE_AI_SEARCH_API_KEY"),
},
clear=True,
)
Expand Down
Loading