Joseph Pollack
adds or improves : interface , tests, docs , ci , precommit , build , and demo
ce644a9 unverified
raw
history blame
2.41 kB
name: CI
on:
push:
branches: [main, dev]
pull_request:
branches: [main, dev]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11"]
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
version: "latest"
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
uv sync --extra dev
- name: Lint with ruff
run: |
uv run ruff check . --exclude tests
uv run ruff format --check . --exclude tests
- name: Type check with mypy
run: |
uv run mypy src
- name: Run unit tests (No Black Box Apis)
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
run: |
uv run pytest tests/unit/ -v -m "not openai and not embedding_provider" --tb=short -p no:logfire --cov --cov-branch --cov-report=xml
- name: Run local embeddings tests
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
run: |
uv run pytest tests/ -v -m "local_embeddings" --tb=short -p no:logfire --cov --cov-branch --cov-report=xml --cov-append || true
continue-on-error: true # Allow failures if dependencies not available
- name: Run HuggingFace integration tests
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
run: |
uv run pytest tests/integration/ -v -m "huggingface and not embedding_provider" --tb=short -p no:logfire --cov --cov-branch --cov-report=xml --cov-append || true
continue-on-error: true # Allow failures if HF_TOKEN not set
- name: Run non-OpenAI integration tests (excluding embedding providers)
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
run: |
uv run pytest tests/integration/ -v -m "integration and not openai and not embedding_provider" --tb=short -p no:logfire --cov --cov-branch --cov-report=xml --cov-append || true
continue-on-error: true # Allow failures if dependencies not available
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v5
continue-on-error: true
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: DeepCritical/GradioDemo