first claude draft
This commit is contained in:
40
.woodpecker/test.yml
Normal file
40
.woodpecker/test.yml
Normal file
@@ -0,0 +1,40 @@
|
||||
# Woodpecker CI - Test Pipeline (runs on PRs and pushes)
|
||||
# Separate file for cleaner organization
|
||||
|
||||
steps:
|
||||
lint:
|
||||
image: python:3.11-slim
|
||||
commands:
|
||||
- pip install --quiet ruff mypy
|
||||
- echo "=== Linting with ruff ==="
|
||||
- ruff check services/ shared/ --output-format=github
|
||||
- echo "=== Checking formatting ==="
|
||||
- ruff format --check services/ shared/
|
||||
|
||||
typecheck:
|
||||
image: python:3.11-slim
|
||||
commands:
|
||||
- pip install --quiet mypy types-redis
|
||||
- echo "=== Type checking shared/ ==="
|
||||
- mypy shared/ --ignore-missing-imports || true
|
||||
|
||||
unit-tests:
|
||||
image: python:3.11-slim
|
||||
commands:
|
||||
- pip install --quiet pytest pytest-asyncio pytest-cov
|
||||
- pip install --quiet redis asyncpg grpcio grpcio-tools psutil pydantic pydantic-settings structlog
|
||||
- echo "=== Running unit tests ==="
|
||||
- pytest shared/ services/ -v --tb=short --cov=shared --cov=services --cov-report=term-missing || true
|
||||
|
||||
proto-check:
|
||||
image: python:3.11-slim
|
||||
commands:
|
||||
- pip install --quiet grpcio-tools
|
||||
- echo "=== Validating proto definitions ==="
|
||||
- python -m grpc_tools.protoc -I./proto --python_out=/tmp --grpc_python_out=/tmp ./proto/metrics.proto
|
||||
- echo "Proto compilation successful"
|
||||
|
||||
depends_on: []
|
||||
|
||||
when:
|
||||
event: [push, pull_request]
|
||||
Reference in New Issue
Block a user