chore(deps): Bump predis/predis from 3.5.1 to 3.6.0 in the composer group #1708
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| permissions: | |
| contents: read | |
| on: | |
| push: | |
| pull_request: | |
| jobs: | |
| tests: | |
| runs-on: ubuntu-latest | |
| services: | |
| mysql: | |
| image: mysql:8.0 | |
| env: | |
| MYSQL_ROOT_PASSWORD: root | |
| MYSQL_DATABASE: testing | |
| MYSQL_USER: test | |
| MYSQL_PASSWORD: test | |
| ports: | |
| - 3306:3306 | |
| options: >- | |
| --health-cmd="mysqladmin ping -h 127.0.0.1 -u test -ptest" | |
| --health-interval=10s | |
| --health-timeout=5s | |
| --health-retries=10 | |
| env: | |
| COMPOSER_AUTH: '{"github-oauth": {"github.com": "${{ secrets.GITHUB_TOKEN }}"}}' | |
| APP_ENV: testing | |
| DB_CONNECTION: mysql | |
| DB_HOST: 127.0.0.1 | |
| DB_PORT: 3306 | |
| DB_DATABASE: testing | |
| DB_USERNAME: test | |
| DB_PASSWORD: test | |
| # Neutralise Redis en CI (ton .env.example force redis) | |
| CACHE_STORE: array | |
| CACHE_DRIVER: array | |
| SESSION_DRIVER: array | |
| QUEUE_CONNECTION: sync | |
| BROADCAST_DRIVER: log | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '8.3' | |
| extensions: zip, ldap, soap, pdo_mysql, sqlite3, bcmath, gd, intl, pcntl | |
| coverage: none | |
| - name: Install dependencies | |
| run: composer install --no-progress --no-interaction --prefer-dist | |
| - name: Security audit (Composer) | |
| run: composer audit --ignore-severity=low --ignore-severity=medium | |
| - name: Setup Node | |
| uses: actions/setup-node@v7 | |
| with: | |
| node-version: '20' | |
| # NE PAS remplacer par "npm ci" : package-lock.json est genere sous | |
| # Windows et ne contient que les binaires natifs win32 de rollup | |
| # (@rollup/rollup-win32-x64-gnu et -msvc), jamais la variante Linux du | |
| # runner. npm ci est strict et echoue dessus ; "npm install" en gardant | |
| # le lock echoue aussi, npm n'ajoutant pas l'optional dep manquante a un | |
| # lock existant. Regenerer le lock depuis Windows ne suffit pas non plus, | |
| # meme avec --os=linux --cpu=x64 : npm continue de n'ecrire que win32. | |
| # | |
| # Conséquence assumee : le CI valide le code, pas l'arbre de dependances | |
| # reellement deploye. Pour lever la contrainte il faut produire le lock | |
| # sur Linux (conteneur node identique a la prod) et le committer ; le CI | |
| # pourra alors passer a "npm ci". | |
| - name: Install npm dependencies | |
| run: rm -f package-lock.json && npm install | |
| # Seuil abaisse a "critical" temporairement : la grappe @univerjs (0.24.x) | |
| # tire une transitive nanoid vulnerable (DoS client) pour laquelle aucun | |
| # correctif n'est atteignable, 0.25.1 etant egalement dans la plage | |
| # affectee. Le seuil "high" faisait donc echouer le job sur toutes les | |
| # branches, y compris WEM-2.0, en masquant les vraies regressions. | |
| # A remonter a "high" des qu'un release amont de @univerjs corrige nanoid. | |
| - name: Security audit (npm) | |
| run: npm audit --omit=dev --audit-level=critical | |
| - name: Prepare Laravel env | |
| run: | | |
| cp .env.example .env | |
| php artisan key:generate | |
| # Override Redis-related settings from .env.example | |
| php -r "\$c=file_get_contents('.env'); \ | |
| \$c=preg_replace('/^APP_ENV=.*/m','APP_ENV=testing',\$c); \ | |
| \$c=preg_replace('/^DB_CONNECTION=.*/m','DB_CONNECTION=mysql',\$c); \ | |
| \$c=preg_replace('/^DB_HOST=.*/m','DB_HOST=127.0.0.1',\$c); \ | |
| \$c=preg_replace('/^DB_PORT=.*/m','DB_PORT=3306',\$c); \ | |
| \$c=preg_replace('/^DB_DATABASE=.*/m','DB_DATABASE=testing',\$c); \ | |
| \$c=preg_replace('/^DB_USERNAME=.*/m','DB_USERNAME=test',\$c); \ | |
| \$c=preg_replace('/^DB_PASSWORD=.*/m','DB_PASSWORD=test',\$c); \ | |
| \$c=preg_replace('/^CACHE_DRIVER=.*/m','CACHE_DRIVER=array',\$c); \ | |
| \$c=preg_replace('/^CACHE_STORE=.*/m','CACHE_STORE=array',\$c); \ | |
| \$c=preg_replace('/^QUEUE_CONNECTION=.*/m','QUEUE_CONNECTION=sync',\$c); \ | |
| \$c=preg_replace('/^SESSION_DRIVER=.*/m','SESSION_DRIVER=array',\$c); \ | |
| \$c=preg_replace('/^BROADCAST_DRIVER=.*/m','BROADCAST_DRIVER=log',\$c); \ | |
| file_put_contents('.env',\$c);" | |
| php artisan config:clear | |
| - name: Wait for MySQL | |
| run: | | |
| until mysqladmin ping -h 127.0.0.1 -u test -ptest --silent; do | |
| sleep 1 | |
| done | |
| - name: Run migrations | |
| run: php artisan migrate --force | |
| - name: Run frontend tests (Vitest) | |
| run: npm test | |
| env: | |
| LARAVEL_BYPASS_ENV_CHECK: 1 | |
| - name: Run PHPUnit | |
| timeout-minutes: 10 | |
| # Tests run on SQLite in-memory (see phpunit.xml / .env.testing): fast | |
| # and deterministic. The job-level DB_CONNECTION=mysql only drives the | |
| # "Run migrations" step above, which validates migrations on MySQL. | |
| env: | |
| DB_CONNECTION: sqlite | |
| DB_DATABASE: ":memory:" | |
| run: vendor/bin/phpunit --colors=always --testdox |