Skip to content

fix(deps): update symfony packages #686

fix(deps): update symfony packages

fix(deps): update symfony packages #686

Workflow file for this run

name: Application tests
on:
pull_request:
concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true
permissions:
contents: read
pull-requests: write
env:
PHP_EXTENSIONS: mbstring, xml, ctype, iconv, intl, mysql
DATABASE_URL: mysql://root:symfony@127.0.0.1:3306/symfony
REDIS_HOST: localhost
APP_ENV: test
jobs:
build:
name: Build dependencies
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 # v2
with:
php-version: "8.4"
extensions: ${{ env.PHP_EXTENSIONS }}
coverage: xdebug
- name: Get Composer Cache Directory
id: composer-cache
run: |
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5
with:
path: |
${{ steps.composer-cache.outputs.dir }}
assets/vendor/
key: ${{ runner.os }}-cache-${{ hashFiles('**/composer.lock') }}-${{ hashFiles('**/importmap.php') }}
restore-keys: |
${{ runner.os }}-cache-
- name: Prepare build artifact
run: |
composer install --no-progress -a
composer run create-tls
bin/console asset-map:compile
- name: Create build artifacts archive
run: |
tar -czf build-artifacts.tar.gz assets/vendor/ tls/ var/ vendor/
- name: Upload build artifacts
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
with:
name: build-artifacts
path: build-artifacts.tar.gz
retention-days: 1
static-analysis:
name: Static code analysis
runs-on: ubuntu-latest
needs: build
strategy:
fail-fast: false
matrix:
php-versions:
- "8.4"
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 # v2
with:
php-version: ${{ matrix.php-versions }}
extensions: ${{ env.PHP_EXTENSIONS }}
coverage: xdebug
- name: Download build artifacts
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7
with:
name: build-artifacts
path: .
- name: Extract build artifacts
run: tar -xzf build-artifacts.tar.gz
- name: Cleanup archive
run: rm build-artifacts.tar.gz
- name: PHP CS Fixer
run: vendor/bin/php-cs-fixer check --diff
- name: rector
run: vendor/bin/rector process src/ --dry-run
- name: PHPStan
run: composer run phpstan
phpunit:
name: PHPUnit (PHP ${{ matrix.php-versions }})
runs-on: ubuntu-latest
needs: build
services:
mysql:
image: mysql:lts@sha256:a2d126916bc2ba79a890a4bf62d305eb8b68fcbdd35c6e582d529df18faf5ebb
env:
MYSQL_ALLOW_EMPTY_PASSWORD: false
MYSQL_ROOT_PASSWORD: symfony
MYSQL_DATABASE: symfony
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
redis:
image: redis@sha256:1c054d54ecd1597bba52f4304bca5afbc5565ebe614c5b3d7dc5b7f8a0cd768d
ports:
- 6379:6379
options: --health-cmd="redis-cli ping" --health-interval=10s --health-timeout=5s --health-retries=3
strategy:
fail-fast: false
matrix:
php-versions:
- "8.4"
- "8.5"
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 # v2
with:
php-version: ${{ matrix.php-versions }}
extensions: ${{ env.PHP_EXTENSIONS }}
coverage: xdebug
- name: Download build artifacts
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7
with:
name: build-artifacts
path: .
- name: Extract build artifacts
run: tar -xzf build-artifacts.tar.gz
- name: Cleanup archive
run: rm build-artifacts.tar.gz
- name: Prepare database
run: |
bin/console doctrine:schema:create
bin/console domain:add example.com
bin/console user:add --password=changeme --admin --enable admin example.com
bin/console dkim:setup --enable --selector dkim example.com
- name: Run tests
run: php -d xdebug.mode=coverage vendor/bin/phpunit --coverage-cobertura=coverage.xml
- name: Create code coverage report
if: ${{ matrix.php-versions == '8.4' }}
uses: irongut/CodeCoverageSummary@51cc3a756ddcd398d447c044c02cb6aa83fdae95 # v1.3.0
with:
filename: coverage.xml
badge: true
fail_below_min: true
format: markdown
hide_branch_rate: false
indicators: true
output: both
thresholds: '60 80'
- name: Add Coverage PR Comment
if: ${{ matrix.php-versions == '8.4' }}
uses: marocchino/sticky-pull-request-comment@773744901bac0e8cbb5a0dc842800d45e9b2b405 # v2
with:
recreate: true
path: code-coverage-results.md