chore: update ci-cd.yml

This commit is contained in:
2025-07-17 20:50:18 +02:00
parent 8a0b107129
commit 75722af348

View File

@@ -14,8 +14,6 @@ env:
jobs:
test:
runs-on: ubuntu-22.04
container:
image: php:8.4-cli
services:
redis:
image: redis:8-alpine
@@ -29,28 +27,19 @@ jobs:
- name: Checkout Code
uses: actions/checkout@v4
- name: Install System Dependencies & Node.js
run: |
apt-get update && apt-get install -y \
git unzip libzip-dev libpng-dev libjpeg-dev \
libfreetype6-dev libwebp-dev libavif-dev \
libxpm-dev curl
curl -fsSL https://deb.nodesource.com/setup_18.x | bash -
apt-get install -y nodejs
node --version
npm --version
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ env.PHP_VERSION }}
extensions: gd, zip, pdo, pdo_mysql, opcache, pcntl, posix, shmop, redis
tools: composer
coverage: none
- name: Install PHP Extensions
run: |
docker-php-ext-configure gd \
--with-freetype --with-jpeg --with-webp \
--with-avif --with-xpm
docker-php-ext-install -j$(nproc) \
gd zip pdo pdo_mysql opcache pcntl posix shmop
- name: Install Composer
run: |
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'npm'
- name: Cache Composer Dependencies
uses: actions/cache@v3
@@ -59,13 +48,6 @@ jobs:
key: composer-${{ hashFiles('**/composer.lock') }}
restore-keys: composer-
- name: Cache Node.js Dependencies
uses: actions/cache@v3
with:
path: ~/.npm
key: npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: npm-
- name: Install Dependencies
run: |
composer install --no-progress --prefer-dist --optimize-autoloader
@@ -97,6 +79,17 @@ jobs:
- name: Checkout Code
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ env.PHP_VERSION }}
tools: composer
coverage: none
- name: Install Dependencies
run: |
composer install --no-progress --prefer-dist --optimize-autoloader
- name: Run Security Scan
run: |
# Composer-Audit für bekannte Vulnerabilities