Sync symfony examples from v2

This commit is contained in:
Shivam Mathur 2021-02-22 10:51:20 +05:30
parent 030f4839d4
commit fdaf1f0003
No known key found for this signature in database
GPG Key ID: 3E13E4C8591ACC2A
3 changed files with 9 additions and 6 deletions

View File

@ -23,7 +23,7 @@ jobs:
- name: Checkout - name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: Setup PHP, with composer and extensions - name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@v1 #https://github.com/shivammathur/setup-php uses: shivammathur/setup-php@v2 #https://github.com/shivammathur/setup-php
with: with:
php-version: ${{ matrix.php-versions }} php-version: ${{ matrix.php-versions }}
extensions: mbstring, xml, ctype, iconv, intl, pdo_sqlite, mysql extensions: mbstring, xml, ctype, iconv, intl, pdo_sqlite, mysql
@ -43,10 +43,11 @@ jobs:
restore-keys: ${{ runner.os }}-composer- restore-keys: ${{ runner.os }}-composer-
- name: Install Composer dependencies - name: Install Composer dependencies
run: | run: |
composer require --dev symfony/orm-pack symfony/phpunit-bridge
composer install --no-progress --prefer-dist --optimize-autoloader composer install --no-progress --prefer-dist --optimize-autoloader
php bin/phpunit install
- name: Run Migration - name: Run Migration
run: | run: |
composer require symfony/orm-pack
php bin/console doctrine:schema:update --force || echo "No migrations found or schema update failed" php bin/console doctrine:schema:update --force || echo "No migrations found or schema update failed"
php bin/console doctrine:migrations:migrate || echo "No migrations found or migration failed" php bin/console doctrine:migrations:migrate || echo "No migrations found or migration failed"
env: env:

View File

@ -23,7 +23,7 @@ jobs:
- name: Checkout - name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: Setup PHP, with composer and extensions - name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@v1 #https://github.com/shivammathur/setup-php uses: shivammathur/setup-php@v2 #https://github.com/shivammathur/setup-php
with: with:
php-version: ${{ matrix.php-versions }} php-version: ${{ matrix.php-versions }}
extensions: mbstring, xml, ctype, iconv, intl, pdo_sqlite, pgsql extensions: mbstring, xml, ctype, iconv, intl, pdo_sqlite, pgsql
@ -41,10 +41,11 @@ jobs:
restore-keys: ${{ runner.os }}-composer- restore-keys: ${{ runner.os }}-composer-
- name: Install Composer dependencies - name: Install Composer dependencies
run: | run: |
composer require --dev symfony/orm-pack symfony/phpunit-bridge
composer install --no-progress --prefer-dist --optimize-autoloader composer install --no-progress --prefer-dist --optimize-autoloader
php bin/phpunit install
- name: Run Migration - name: Run Migration
run: | run: |
composer require symfony/orm-pack
php bin/console doctrine:schema:update --force || echo "No migrations found or schema update failed" php bin/console doctrine:schema:update --force || echo "No migrations found or schema update failed"
php bin/console doctrine:migrations:migrate || echo "No migrations found or migration failed" php bin/console doctrine:migrations:migrate || echo "No migrations found or migration failed"
env: env:

View File

@ -14,7 +14,7 @@ jobs:
- name: Checkout - name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: Setup PHP, with composer and extensions - name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@v1 #https://github.com/shivammathur/setup-php uses: shivammathur/setup-php@v2 #https://github.com/shivammathur/setup-php
with: with:
php-version: ${{ matrix.php-versions }} php-version: ${{ matrix.php-versions }}
extensions: mbstring, xml, ctype, iconv, intl, pdo_sqlite extensions: mbstring, xml, ctype, iconv, intl, pdo_sqlite
@ -32,7 +32,8 @@ jobs:
restore-keys: ${{ runner.os }}-composer- restore-keys: ${{ runner.os }}-composer-
- name: Install Composer dependencies - name: Install Composer dependencies
run: | run: |
composer require symfony/orm-pack composer require --dev symfony/phpunit-bridge
composer install --no-progress --prefer-dist --optimize-autoloader composer install --no-progress --prefer-dist --optimize-autoloader
php bin/phpunit install
- name: Run Tests - name: Run Tests
run: php bin/phpunit --coverage-text run: php bin/phpunit --coverage-text