85 lines
2.7 KiB
YAML
85 lines
2.7 KiB
YAML
name: Tracing SDK Test
|
|
|
|
on:
|
|
pull_request:
|
|
types:
|
|
- opened
|
|
- synchronize
|
|
- reopened
|
|
paths-ignore:
|
|
- "docs/**"
|
|
- "**.md"
|
|
- "dev/clint/**"
|
|
- ".github/workflows/docs.yml"
|
|
- ".github/workflows/preview-docs.yml"
|
|
- "mlflow/server/js/**"
|
|
- ".github/workflows/js.yml"
|
|
- ".claude/**"
|
|
push:
|
|
branches:
|
|
- master
|
|
- branch-[0-9]+.[0-9]+
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
# Use `bash` by default for all `run` steps in this workflow:
|
|
# https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#defaultsrun
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
|
|
env:
|
|
MLFLOW_HOME: /home/runner/work/mlflow/mlflow
|
|
MLFLOW_CONDA_HOME: /usr/share/miniconda
|
|
PYTHONUTF8: "1"
|
|
MLFLOW_SERVER_ENABLE_JOB_EXECUTION: "false"
|
|
PIP_CONSTRAINT: ${{ github.workspace }}/requirements/constraints.txt
|
|
|
|
permissions: {}
|
|
|
|
jobs:
|
|
core:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
timeout-minutes: 30
|
|
if: github.event_name != 'pull_request' || (github.event.pull_request.draft == false || github.event.pull_request.user.login == 'Copilot' && github.event.pull_request.user.type == 'Bot')
|
|
steps:
|
|
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
|
with:
|
|
persist-credentials: false
|
|
- uses: ./.github/actions/setup-python
|
|
|
|
# Install mlflow-tracing SDK from the current directory
|
|
- name: Install mlflow-tracing SDK
|
|
run: |
|
|
uv pip install --system setuptools --upgrade
|
|
uv pip install --system ./libs/tracing
|
|
|
|
- name: Install test dependencies
|
|
run: |
|
|
uv pip install --system pytest pytest-asyncio pytest-timeout litellm
|
|
|
|
- name: Run core tracing tests
|
|
# NB: OTLP exporter includes large dependencies, so we want to test it in a separate job
|
|
# to avoid overlooking unnecessary dependencies in the core tracing package.
|
|
run: |
|
|
export PYTHONPATH=$(pwd)
|
|
pytest tests/tracing \
|
|
--ignore tests/tracing/utils/test_otlp.py \
|
|
--ignore tests/tracing/test_assessment.py \
|
|
--ignore tests/tracing/test_otel_logging.py \
|
|
--ignore tests/tracing/processor/test_otel_metrics.py \
|
|
--ignore tests/tracing/opentelemetry/test_integration.py \
|
|
--ignore tests/tracing/test_otel_loading.py \
|
|
--import-mode=importlib
|
|
|
|
# TODO: Add a job to run autologging tests against integrated libraries (latest versions)
|
|
|
|
# TODO: Add a job to warn large package size increase.
|
|
# package-size:
|
|
|
|
# TODO: Add a job to test OTLP export
|