diff --git a/.woodpecker.yml b/.woodpecker.yml new file mode 100644 index 0000000..e2f98e5 --- /dev/null +++ b/.woodpecker.yml @@ -0,0 +1,47 @@ +when: + - event: [push, pull_request] + +steps: + setup: + image: python:3.11-slim + commands: + - echo "=== CI Pipeline Test ===" + - python --version + - pip --version + + install: + image: python:3.11-slim + commands: + - pip install pytest + - pip install requests + depends_on: [setup] + + test: + image: python:3.11-slim + commands: + - pip install pytest requests + - python -c "import sys; print(f\"Python {sys.version}\")" + - pytest --version + - python test_sample.py + depends_on: [install] + + notify: + image: plugins/webhook + settings: + urls: https://api.heyami.ai/webhooks/ci/build + content_type: application/json + template: | + { + "event": "build_{{build.status}}", + "repo": "{{repo.name}}", + "branch": "{{commit.branch}}", + "commit": "{{commit.sha}}", + "message": "{{commit.message}}", + "author": "{{commit.author}}", + "build_number": {{build.number}}, + "build_link": "{{build.link}}", + "status": "{{build.status}}" + } + when: + - status: [success, failure] +