This directory contains CI/CD workflows for the Latitude.sh Python SDK.
Runs the complete integration test suite across multiple Python versions.
Triggers:
- Push to
main,master, ordevelopbranches - Pull requests targeting these branches
- Manual workflow dispatch
Matrix Strategy:
- Python versions: 3.10, 3.11, 3.12
- OS: Ubuntu Latest
Steps:
- Checkout code
- Set up Python environment
- Install Poetry and cache dependencies
- Install project dependencies
- Run integration tests with pytest
- Generate coverage report (Python 3.12 only)
- Upload coverage to Codecov (Python 3.12 only)
Status Badge:
Runs code quality checks and static type analysis.
Triggers:
- Push to
main,master, ordevelopbranches - Pull requests targeting these branches
- Manual workflow dispatch
Tools:
- Pylint: Code quality and style checking
- Mypy: Static type checking
- Pyright: Microsoft's static type checker
Status Badge:
To run the same checks locally before pushing:
# Run integration tests
poetry run pytest tests/integration -v
# Run with coverage
poetry run pytest tests/integration --cov=latitudesh_python_sdk --cov-report=term
# Run linters
poetry run pylint src/latitudesh_python_sdk
poetry run mypy src/latitudesh_python_sdk
poetry run pyright src/latitudesh_python_sdkAll workflow dependencies are managed via Poetry and defined in pyproject.toml:
[tool.poetry.group.dev.dependencies]
pytest = "^8.3.4"
pytest-asyncio = "^0.25.2"
pytest-mock = "^3.14.0"
pytest-cov = "^6.0.0"
mypy = "==1.15.0"
pylint = "==3.2.3"
pyright = "==1.1.398"Workflows use GitHub Actions cache to speed up runs:
- Cache key:
venv-{os}-{python-version}-{poetry.lock-hash} - Cached path:
.venv(Poetry virtual environment) - Cache hit: Skip dependency installation
- Cache miss: Install dependencies and update cache
Test coverage is automatically:
- Generated during the Python 3.12 test run
- Uploaded to Codecov with the
integrationflag - Available in the workflow artifacts
To view coverage locally:
poetry run pytest tests/integration --cov=latitudesh_python_sdk --cov-report=html
open htmlcov/index.html