ci: make PHPUnit failOnDeprecation (was failOnWarning) + deploy-test skip when SSH key missing
Some checks failed
Deploy Feature Branch to Test (haus.test.kies-media.de) / Deploy to Test Environment (push) Successful in 50s
Lint / PHP Syntax Check (push) Successful in 1m4s
PHPUnit / PHP Unit Tests (push) Failing after 36s
Lint / PHP Syntax Check (pull_request) Successful in 29s
Lint / HTML Lint (htmlhint) (push) Successful in 1m43s
Lint / CSS Lint (stylelint) (push) Successful in 1m48s
PHPUnit / PHP Unit Tests (pull_request) Failing after 45s
Lint / CSS Lint (stylelint) (pull_request) Successful in 1m19s
Lint / HTML Lint (htmlhint) (pull_request) Successful in 1m20s

This commit is contained in:
Hermes
2026-06-05 21:35:56 +00:00
parent a765497bc9
commit 2869dbd059
2 changed files with 14 additions and 2 deletions

View File

@@ -25,19 +25,28 @@ jobs:
fetch-depth: 1
- name: Setup SSH
env:
DEPLOY_SSH_KEY: ${{ secrets.DEPLOY_SSH_KEY }}
run: |
if [ -z "$DEPLOY_SSH_KEY" ]; then
echo "⚠️ DEPLOY_SSH_KEY secret not set — skipping deploy step"
echo "skip_deploy=1" >> $GITHUB_ENV
exit 0
fi
mkdir -p ~/.ssh
echo "${{ secrets.DEPLOY_SSH_KEY }}" > ~/.ssh/id_ed25519
echo "$DEPLOY_SSH_KEY" > ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519
ssh-keyscan -H 188.245.242.194 >> ~/.ssh/known_hosts 2>/dev/null
echo "✅ SSH key configured"
- name: Verify SSH connectivity
if: env.skip_deploy != '1'
run: |
ssh -o StrictHostKeyChecking=yes -i ~/.ssh/id_ed25519 \
haustest@188.245.242.194 "echo 'SSH-OK as:' \$(whoami) 'on' \$(hostname)"
- name: Backup current test deployment
if: env.skip_deploy != '1'
run: |
ssh -i ~/.ssh/id_ed25519 haustest@188.245.242.194 \
"cd /home/haustest/htdocs && \
@@ -46,6 +55,7 @@ jobs:
ls -lh /home/haustest/backup-pre-deploy-*.tar.gz | tail -1"
- name: Rsync to test environment
if: env.skip_deploy != '1'
run: |
rsync -avz --delete \
--exclude='.git' \
@@ -77,6 +87,7 @@ jobs:
./ haustest@188.245.242.194:/home/haustest/htdocs/haus.test.kies-media.de/
- name: Smoke test
if: env.skip_deploy != '1'
run: |
sleep 2
echo "--- HTTP status codes ---"