--- /dev/null
+---
+# CI_PREV_PIPELINE_STATUS is set wrong on workflow failures
+# https://github.com/woodpecker-ci/woodpecker/issues/3343
+
+steps:
+ - name: notify fail
+ image: debian:stable-backports
+ environment:
+ STATUS: failure
+ commands:
+ - apt update && apt install -q2 -y go-sendxmpp/stable-backports ca-certificates
+ - bash .woodpecker/notify.sh
+ when:
+ - event: [ push, manual ]
+
+depends_on:
+ - tests
+
+runs_on: [ failure ]
--- /dev/null
+---
+# CI_PREV_PIPELINE_STATUS is set wrong on workflow failures
+# https://github.com/woodpecker-ci/woodpecker/issues/3343
+
+steps:
+ - name: notify success
+ image: debian:stable-backports
+ environment:
+ STATUS: success
+ commands:
+ - apt update && apt install -q2 -y go-sendxmpp/stable-backports ca-certificates
+ - bash .woodpecker/notify.sh
+ when:
+ - event: [ push, manual ]
+
+depends_on:
+ - tests
+
+runs_on: [ success ]
--- /dev/null
+#!/usr/bin/env bash
+
+#slixsend -j anon.azylum.org -p foo -m -t kaliko@conf.azylum.org "${CI_REPO}: ${CI_PIPELINE_URL}"
+env
+
+if [ "${CI_PREV_PIPELINE_STATUS}" != "failure" ] && [ "${STATUS}" != "failure" ];then
+ exit 0
+fi
+
+# Set the correct message
+if [ "${STATUS}" = "success" ]; then
+ MESSAGE="✔️ Pipeline for ${CI_COMMIT_SHA:0:8} on ${CI_REPO} succeeded."
+else
+ MESSAGE="❌ Pipeline for \"${CI_COMMIT_MESSAGE}\" ${CI_COMMIT_SHA:0:8} on ${CI_REPO} failed.\nSee ${CI_PIPELINE_URL}"
+fi
+
+#slixsend -j anon.azylum.org -p foo -m -t kaliko@conf.azylum.org "${MESSAGE}"
+printf "%s" "${MESSAGE}" | go-sendxmpp --anonymous -u "anon.azylum.org" -a woodpecker -c kaliko@conf.azylum.org || echo "❌ Failed to send notification!"
--- /dev/null
+matrix:
+ PYTHON_VERSION:
+ - 3.6
+ - 3.7
+ - 3.8
+ - 3.9
+ - 3.10
+ - 3.11
+ - 3.12
+
+steps:
+ - name: test
+ image: python:${PYTHON_VERSION}
+ commands:
+ - python -m venv venv
+ - . venv/bin/activate
+ - pip install pytest-cov build
+ - py.test -q --cov=musicpd test.py
+ when:
+ - path:
+ include: ['musicpd.py', 'test.py', '.woodpecker/*']
+ event: [ push, tag, manual ]
+
+ - name: build
+ image: python:${PYTHON_VERSION}
+ commands:
+ - . venv/bin/activate
+ # packaging test
+ - python3 -m build -s -w
+ - pip install dist/*.whl
+ when:
+ - evaluate: 'PYTHON_VERSION in ["3.9", "3.10", "3.11", "3.12"]'
+ path:
+ include: ['pyproject.toml', '.woodpecker/*']
+ event: [ push, tag, manual ]
+
+ - name: sphinx
+ image: python:${PYTHON_VERSION}
+ commands:
+ - . venv/bin/activate
+ - pip install sphinx sphinx_rtd_theme
+ - sphinx-build doc/source -b html ./html -D html_theme=sphinx_rtd_theme
+ when:
+ - evaluate: 'PYTHON_VERSION == "3.12"'
+ path:
+ include: ['doc/**', '.woodpecker/*', 'README.rst']
+ event: [push, tag, manual]