name: CI on: push: jobs: test: runs-on: docker steps: - name: Checkout uses: actions/checkout@v4 - name: Install system dependencies run: | apt-get update DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends python3-venv pipx - name: Install Poetry env: PYTHON_BIN: ${{ matrix.python }} POETRY_VERSION: "2.4.1" run: | set -eux if ! command -v pipx >/dev/null 2>&1; then "${PYTHON_BIN}" -m pip install --user pipx fi PIPX_BIN="$(command -v pipx || true)" if [ -z "${PIPX_BIN}" ]; then PIPX_BIN="${HOME}/.local/bin/pipx" fi "${PIPX_BIN}" install --python "${PYTHON_BIN}" "poetry==${POETRY_VERSION}" echo "$HOME/.local/bin" >> "$GITHUB_PATH" export PATH="$HOME/.local/bin:$PATH" poetry --version poetry --version | grep -E "Poetry \(version 2\." - name: Install project deps (including test extras) env: PYTHON_BIN: ${{ matrix.python }} run: | poetry env use "${PYTHON_BIN}" poetry install --with dev - name: Run test script run: | ./tests.sh # Notify if any previous step in this job failed - name: Notify on failure if: ${{ failure() }} env: WEBHOOK_URL: ${{ secrets.NODERED_WEBHOOK_URL }} REPOSITORY: ${{ forgejo.repository }} RUN_NUMBER: ${{ forgejo.run_number }} SERVER_URL: ${{ forgejo.server_url }} run: | curl -X POST \ -H "Content-Type: application/json" \ -d "{\"repository\":\"$REPOSITORY\",\"run_number\":\"$RUN_NUMBER\",\"status\":\"failure\",\"url\":\"$SERVER_URL/$REPOSITORY/actions/runs/$RUN_NUMBER\"}" \ "$WEBHOOK_URL"