Add Woodpecker CI pipeline configuration
This commit is contained in:
parent
5306004fcb
commit
01bb3c4f88
47
.woodpecker.yml
Normal file
47
.woodpecker.yml
Normal file
@ -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]
|
||||||
|
|
||||||
Loading…
Reference in New Issue
Block a user