1 Commits

Author SHA1 Message Date
f55cd26277 ci: expose dev manual actions on default branch
All checks were successful
CI/CD Pipeline / Manual Actions Require Dev Branch (pull_request) Has been skipped
CI/CD Pipeline / Code Quality Checks (pull_request) Successful in 2m59s
CI/CD Pipeline / Run Tests (pull_request) Successful in 3m3s
CI/CD Pipeline / Telegram Notify Success (pull_request) Successful in 12s
2026-04-28 11:48:41 +02:00

View File

@@ -84,6 +84,7 @@ jobs:
- name: Telegram notify (lint failed) - name: Telegram notify (lint failed)
if: failure() if: failure()
continue-on-error: true
run: | run: |
set -euo pipefail set -euo pipefail
if [ -z "${TG_BOT_KEY:-}" ] || [ -z "${TG_CHANNEL:-}" ]; then if [ -z "${TG_BOT_KEY:-}" ] || [ -z "${TG_CHANNEL:-}" ]; then
@@ -96,7 +97,11 @@ jobs:
sha=${GITHUB_SHA} sha=${GITHUB_SHA}
actor=${GITHUB_ACTOR}" actor=${GITHUB_ACTOR}"
curl -fsS -X POST "https://api.telegram.org/bot${TG_BOT_KEY}/sendMessage" \ curl -fsS \
--connect-timeout 5 \
--max-time 15 \
--retry 1 \
-X POST "https://api.telegram.org/bot${TG_BOT_KEY}/sendMessage" \
-d "chat_id=${TG_CHANNEL}" \ -d "chat_id=${TG_CHANNEL}" \
--data-urlencode "text=${MSG}" --data-urlencode "text=${MSG}"
@@ -139,7 +144,7 @@ jobs:
--no-managed-python \ --no-managed-python \
--no-python-downloads --no-python-downloads
- name: Run Django tests - name: Run pytest suite
env: env:
DJANGO_SETTINGS_MODULE: settings.test DJANGO_SETTINGS_MODULE: settings.test
SECRET_KEY: test-secret-key-for-ci SECRET_KEY: test-secret-key-for-ci
@@ -147,10 +152,11 @@ jobs:
set -euo pipefail set -euo pipefail
. .venv/bin/activate . .venv/bin/activate
export PYTHONPATH="${PWD}/src:${PYTHONPATH:-}" export PYTHONPATH="${PWD}/src:${PYTHONPATH:-}"
python src/manage.py test tests --verbosity=2 python -m pytest tests --ignore=tests/test_api_inventory_e2e.py -q
- name: Telegram notify (test failed) - name: Telegram notify (test failed)
if: failure() if: failure()
continue-on-error: true
run: | run: |
set -euo pipefail set -euo pipefail
if [ -z "${TG_BOT_KEY:-}" ] || [ -z "${TG_CHANNEL:-}" ]; then if [ -z "${TG_BOT_KEY:-}" ] || [ -z "${TG_CHANNEL:-}" ]; then
@@ -163,7 +169,11 @@ jobs:
sha=${GITHUB_SHA} sha=${GITHUB_SHA}
actor=${GITHUB_ACTOR}" actor=${GITHUB_ACTOR}"
curl -fsS -X POST "https://api.telegram.org/bot${TG_BOT_KEY}/sendMessage" \ curl -fsS \
--connect-timeout 5 \
--max-time 15 \
--retry 1 \
-X POST "https://api.telegram.org/bot${TG_BOT_KEY}/sendMessage" \
-d "chat_id=${TG_CHANNEL}" \ -d "chat_id=${TG_CHANNEL}" \
--data-urlencode "text=${MSG}" --data-urlencode "text=${MSG}"
@@ -181,6 +191,7 @@ jobs:
TG_CHANNEL: ${{ secrets.TG_CHANNEL }} TG_CHANNEL: ${{ secrets.TG_CHANNEL }}
steps: steps:
- name: Telegram notify (lint+test success) - name: Telegram notify (lint+test success)
continue-on-error: true
env: env:
COMMIT_MESSAGE: ${{ github.event.head_commit.message }} COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
run: | run: |
@@ -196,7 +207,11 @@ jobs:
actor=${GITHUB_ACTOR} actor=${GITHUB_ACTOR}
commit=${COMMIT_MESSAGE:-n/a}" commit=${COMMIT_MESSAGE:-n/a}"
curl -fsS -X POST "https://api.telegram.org/bot${TG_BOT_KEY}/sendMessage" \ curl -fsS \
--connect-timeout 5 \
--max-time 15 \
--retry 1 \
-X POST "https://api.telegram.org/bot${TG_BOT_KEY}/sendMessage" \
-d "chat_id=${TG_CHANNEL}" \ -d "chat_id=${TG_CHANNEL}" \
--data-urlencode "text=${MSG}" --data-urlencode "text=${MSG}"