Optimize production-deploy: use php-ci image for test job (remove PHP setup)

This commit is contained in:
2025-10-31 15:32:10 +01:00
parent b5637fe13b
commit b58bf33119

View File

@@ -20,9 +20,7 @@ jobs:
# Job 1: Run Tests
test:
name: Run Tests & Quality Checks
runs-on: ubuntu-latest
# Note: if condition might not work with push events in Gitea
# For now, always run tests - we can add skip_tests logic later
runs-on: php-ci # Uses pre-built PHP 8.5 CI image with Composer pre-installed
steps:
- name: Checkout code
run: |
@@ -50,30 +48,7 @@ jobs:
cd /workspace/repo
- name: Setup PHP
run: |
# Add sury.org repository for PHP 8.x
apt-get update
apt-get install -y lsb-release ca-certificates apt-transport-https software-properties-common
curl -sSL https://packages.sury.org/php/apt.gpg | apt-key add -
echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/php.list
apt-get update
# Install PHP 8.5 (matches composer.json requirement ^8.5 and Dockerfiles)
# Note: pcntl and sodium are built-in in PHP 8.5, no separate packages needed
apt-get install -y \
php8.5 \
php8.5-cli \
php8.5-mbstring \
php8.5-xml \
php8.5-pdo \
php8.5-pdo-mysql \
php8.5-zip \
php8.5-gd \
php8.5-intl \
php8.5-bcmath \
php8.5-redis \
composer
# PHP is already installed in php-ci image - no setup needed
- name: Cache Composer dependencies (simple)
run: |