tipo: modificación del cpanel y gitignore de la carpeta vendor
This commit is contained in:
@@ -0,0 +1,138 @@
|
||||
name: Cross Platform
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- '*.x'
|
||||
pull_request:
|
||||
branches:
|
||||
- '*.x'
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest, macos-latest]
|
||||
php: ['7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5']
|
||||
dependency-version: [prefer-lowest, prefer-stable]
|
||||
exclude:
|
||||
# Exclude older PHP versions from newer OS to reduce matrix size
|
||||
- os: windows-latest
|
||||
php: '7.4'
|
||||
- os: windows-latest
|
||||
php: '8.0'
|
||||
- os: macos-latest
|
||||
php: '7.4'
|
||||
- os: macos-latest
|
||||
php: '8.0'
|
||||
# PHPUnit 12 has compatibility issues with prefer-lowest on multiple PHP versions
|
||||
- php: '8.1'
|
||||
dependency-version: prefer-lowest
|
||||
- php: '8.2'
|
||||
dependency-version: prefer-lowest
|
||||
- php: '8.3'
|
||||
dependency-version: prefer-lowest
|
||||
- php: '8.4'
|
||||
dependency-version: prefer-lowest
|
||||
- php: '8.5'
|
||||
dependency-version: prefer-lowest
|
||||
|
||||
name: P${{ matrix.php }} - ${{ matrix.os }} - ${{ matrix.dependency-version }}
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: ${{ matrix.php }}
|
||||
extensions: dom, curl, libxml, mbstring, zip, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, fileinfo, json
|
||||
coverage: none
|
||||
|
||||
- name: Validate composer.json and composer.lock
|
||||
run: composer validate --strict
|
||||
|
||||
- name: Cache Composer packages
|
||||
id: composer-cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: vendor
|
||||
key: ${{ runner.os }}-php-${{ matrix.php }}-${{ hashFiles('**/composer.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-php-${{ matrix.php }}-
|
||||
|
||||
- name: Configure platform for PHP 8.5
|
||||
if: matrix.php == '8.5'
|
||||
run: composer config platform.php 8.4.0
|
||||
|
||||
- name: Install dependencies
|
||||
run: composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-progress
|
||||
|
||||
- name: List Installed Dependencies
|
||||
run: composer show -D
|
||||
|
||||
- name: Execute tests
|
||||
run: vendor/bin/phpunit --no-coverage
|
||||
|
||||
code-quality:
|
||||
runs-on: ubuntu-latest
|
||||
name: Code Quality
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Node.js
|
||||
if: hashFiles('package.json') != ''
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '18'
|
||||
cache: 'npm'
|
||||
|
||||
- name: Install Node.js dependencies
|
||||
if: hashFiles('package.json') != ''
|
||||
run: npm install
|
||||
|
||||
- name: Check code style with Prettier
|
||||
if: hashFiles('package.json') != ''
|
||||
run: npm run format:check
|
||||
continue-on-error: true
|
||||
|
||||
- name: Skip Node.js checks (no package.json found)
|
||||
if: hashFiles('package.json') == ''
|
||||
run: echo "No package.json found, skipping Node.js code quality checks"
|
||||
|
||||
security:
|
||||
runs-on: ubuntu-latest
|
||||
name: Security Audit
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: 8.3
|
||||
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo, json
|
||||
coverage: none
|
||||
|
||||
- name: Cache Composer packages
|
||||
id: composer-cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: vendor
|
||||
key: ${{ runner.os }}-php-8.3-${{ hashFiles('**/composer.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-php-8.3-
|
||||
|
||||
- name: Install dependencies
|
||||
run: composer install --prefer-dist --no-interaction --no-progress
|
||||
|
||||
- name: Security audit
|
||||
run: composer audit
|
||||
continue-on-error: true
|
||||
@@ -0,0 +1,129 @@
|
||||
name: PHPUnit
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- '*.x'
|
||||
pull_request:
|
||||
branches:
|
||||
- '*.x'
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
php: ['7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5']
|
||||
dependency-version: [prefer-lowest, prefer-stable]
|
||||
exclude:
|
||||
# PHPUnit 12 has compatibility issues with prefer-lowest on multiple PHP versions
|
||||
- php: '8.1'
|
||||
dependency-version: prefer-lowest
|
||||
- php: '8.2'
|
||||
dependency-version: prefer-lowest
|
||||
- php: '8.3'
|
||||
dependency-version: prefer-lowest
|
||||
- php: '8.4'
|
||||
dependency-version: prefer-lowest
|
||||
- php: '8.5'
|
||||
dependency-version: prefer-lowest
|
||||
|
||||
name: P${{ matrix.php }} - ${{ matrix.dependency-version }}
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: ${{ matrix.php }}
|
||||
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo, json
|
||||
coverage: none
|
||||
|
||||
- name: Setup problem matchers
|
||||
run: |
|
||||
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
|
||||
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
|
||||
|
||||
- name: Cache Composer packages
|
||||
id: composer-cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: vendor
|
||||
key: ${{ runner.os }}-php-${{ matrix.php }}-${{ hashFiles('**/composer.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-php-${{ matrix.php }}-
|
||||
|
||||
- name: Configure platform for PHP 8.5
|
||||
if: matrix.php == '8.5'
|
||||
run: composer config platform.php 8.4.0
|
||||
|
||||
- name: Install dependencies
|
||||
run: composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-progress
|
||||
|
||||
- name: List Installed Dependencies
|
||||
run: composer show -D
|
||||
|
||||
- name: Execute tests
|
||||
run: vendor/bin/phpunit --no-coverage
|
||||
|
||||
coverage:
|
||||
runs-on: ubuntu-latest
|
||||
name: Coverage
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: 8.3
|
||||
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo, json
|
||||
coverage: xdebug3
|
||||
|
||||
- name: Cache Composer packages
|
||||
id: composer-cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: vendor
|
||||
key: ${{ runner.os }}-php-8.3-${{ hashFiles('**/composer.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-php-8.3-
|
||||
|
||||
- name: Install dependencies
|
||||
run: composer install --prefer-dist --no-interaction --no-progress
|
||||
|
||||
- name: Check Xdebug status
|
||||
run: php -m | grep -i xdebug
|
||||
|
||||
- name: Execute tests with coverage
|
||||
run: |
|
||||
echo "Current working directory: $(pwd)"
|
||||
echo "PHPUnit command: vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover"
|
||||
export XDEBUG_MODE=coverage
|
||||
echo "Xdebug mode set to: $XDEBUG_MODE"
|
||||
vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover
|
||||
echo "PHPUnit exit code: $?"
|
||||
|
||||
- name: Check if coverage file was created
|
||||
run: |
|
||||
echo "Checking for coverage file..."
|
||||
echo "Current directory contents:"
|
||||
ls -la
|
||||
echo "Looking for clover files:"
|
||||
ls -la *.clover 2>/dev/null || echo "No clover files found in current directory"
|
||||
echo "Searching entire directory tree:"
|
||||
find . -name "*.clover" -type f 2>/dev/null || echo "No clover files found anywhere"
|
||||
echo "Checking if Xdebug coverage mode is working:"
|
||||
php -r "echo 'Xdebug mode: ' . (getenv('XDEBUG_MODE') ?: 'not set') . PHP_EOL;"
|
||||
|
||||
- name: Upload coverage reports to Codecov
|
||||
uses: codecov/codecov-action@v5
|
||||
with:
|
||||
token: ${{ secrets.CODECOV_TOKEN }}
|
||||
files: coverage.clover
|
||||
fail_ci_if_error: false
|
||||
@@ -0,0 +1,49 @@
|
||||
name: Static Analysis
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- '*.x'
|
||||
pull_request:
|
||||
branches:
|
||||
- '*.x'
|
||||
|
||||
jobs:
|
||||
phpstan:
|
||||
runs-on: ubuntu-latest
|
||||
name: PHPStan P${{ matrix.php-version }}
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
php-version: ['7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5']
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: ${{ matrix.php-version }}
|
||||
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo, json
|
||||
coverage: none
|
||||
|
||||
- name: Cache Composer packages
|
||||
id: composer-cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: vendor
|
||||
key: ${{ runner.os }}-php-${{ matrix.php-version }}-${{ hashFiles('**/composer.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-php-${{ matrix.php-version }}-
|
||||
|
||||
- name: Configure platform for PHP 8.5
|
||||
if: matrix.php-version == '8.5'
|
||||
run: composer config platform.php 8.4.0
|
||||
|
||||
- name: Install dependencies
|
||||
run: composer install --prefer-dist --no-interaction --no-progress
|
||||
|
||||
- name: Execute static analysis
|
||||
run: vendor/bin/phpstan analyse --no-progress --level=5
|
||||
Reference in New Issue
Block a user