WIP: Release/3.0.0 #164
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
| on: pull_request | |
| name: Doctrine | |
| jobs: | |
| validate-doctrine-shema: | |
| runs-on: ubuntu-latest | |
| env: | |
| DATABASE_URL: mysql://db:[email protected]:3306/db?serverVersion=mariadb-10.5.13 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| php: ["8.3"] | |
| name: Validate Schema (PHP ${{ matrix.php}}) | |
| services: | |
| mariadb: | |
| image: mariadb:10.5.13 | |
| env: | |
| MYSQL_USER: db | |
| MYSQL_PASSWORD: db | |
| MYSQL_DATABASE: db | |
| MYSQL_ROOT_PASSWORD: db | |
| ports: | |
| - 3306:3306 | |
| options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup PHP, with composer and extensions | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php}} | |
| extensions: apcu, ctype, iconv, imagick, json, redis, soap, xmlreader, zip | |
| coverage: none | |
| - name: Get composer cache directory | |
| id: composer-cache | |
| run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT | |
| - name: Cache composer dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ steps.composer-cache.outputs.dir }} | |
| key: ${{ matrix.php }}-composer-${{ hashFiles('**/composer.lock') }} | |
| restore-keys: ${{ matrix.php }}-composer- | |
| - name: "Composer install with exported .env variables" | |
| run: | | |
| set -a && source .env && set +a | |
| APP_ENV=prod composer install --no-dev -o | |
| - name: Run Doctrine Migrations | |
| run: APP_ENV=prod php bin/console doctrine:migrations:migrate --no-interaction | |
| - name: Validate Doctrine schema | |
| run: APP_ENV=prod php bin/console doctrine:schema:validate |