mirror of
https://github.com/shivammathur/setup-php.git
synced 2024-11-22 20:01:06 +07:00
Improve symfony examples
This commit is contained in:
parent
c88f07696b
commit
6a8a2abd3c
@ -26,6 +26,7 @@ jobs:
|
|||||||
uses: shivammathur/setup-php@v2 #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 }}
|
||||||
|
tools: phpunit-bridge
|
||||||
extensions: mbstring, xml, ctype, iconv, intl, pdo_sqlite, mysql
|
extensions: mbstring, xml, ctype, iconv, intl, pdo_sqlite, mysql
|
||||||
coverage: xdebug #optional
|
coverage: xdebug #optional
|
||||||
- name: Start mysql service
|
- name: Start mysql service
|
||||||
@ -42,15 +43,15 @@ jobs:
|
|||||||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
||||||
restore-keys: ${{ runner.os }}-composer-
|
restore-keys: ${{ runner.os }}-composer-
|
||||||
- name: Install Composer dependencies
|
- name: Install Composer dependencies
|
||||||
run: |
|
run: composer install --no-progress --prefer-dist --optimize-autoloader
|
||||||
composer require --dev symfony/orm-pack symfony/phpunit-bridge
|
|
||||||
composer install --no-progress --prefer-dist --optimize-autoloader
|
|
||||||
php bin/phpunit install
|
|
||||||
- name: Run Migration
|
- name: Run Migration
|
||||||
run: |
|
run: |
|
||||||
|
composer require --dev 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:
|
||||||
DATABASE_URL: mysql://root:symfony@127.0.0.1:${{ job.services.mysql.ports['3306'] }}/symfony
|
DATABASE_URL: mysql://root:symfony@127.0.0.1:${{ job.services.mysql.ports['3306'] }}/symfony
|
||||||
- name: Run Tests
|
- name: Install PHPUnit
|
||||||
run: php bin/phpunit --coverage-text
|
run: simple-phpunit install
|
||||||
|
- name: Run tests
|
||||||
|
run: simple-phpunit --coverage-text
|
||||||
|
@ -26,6 +26,7 @@ jobs:
|
|||||||
uses: shivammathur/setup-php@v2 #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 }}
|
||||||
|
tools: phpunit-bridge
|
||||||
extensions: mbstring, xml, ctype, iconv, intl, pdo_sqlite, pgsql
|
extensions: mbstring, xml, ctype, iconv, intl, pdo_sqlite, pgsql
|
||||||
coverage: xdebug #optional
|
coverage: xdebug #optional
|
||||||
- name: Get composer cache directory
|
- name: Get composer cache directory
|
||||||
@ -40,15 +41,15 @@ jobs:
|
|||||||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
||||||
restore-keys: ${{ runner.os }}-composer-
|
restore-keys: ${{ runner.os }}-composer-
|
||||||
- name: Install Composer dependencies
|
- name: Install Composer dependencies
|
||||||
run: |
|
run: composer install --no-progress --prefer-dist --optimize-autoloader
|
||||||
composer require --dev symfony/orm-pack symfony/phpunit-bridge
|
|
||||||
composer install --no-progress --prefer-dist --optimize-autoloader
|
|
||||||
php bin/phpunit install
|
|
||||||
- name: Run Migration
|
- name: Run Migration
|
||||||
run: |
|
run: |
|
||||||
|
composer require --dev 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:
|
||||||
DATABASE_URL: postgres://postgres:postgres@127.0.0.1:${{ job.services.postgres.ports[5432] }}/postgres?charset=UTF-8
|
DATABASE_URL: postgres://postgres:postgres@127.0.0.1:${{ job.services.postgres.ports[5432] }}/postgres?charset=UTF-8
|
||||||
- name: Run Tests
|
- name: Install PHPUnit
|
||||||
run: php bin/phpunit --coverage-text
|
run: simple-phpunit install
|
||||||
|
- name: Run tests
|
||||||
|
run: simple-phpunit --coverage-text
|
||||||
|
@ -17,6 +17,7 @@ jobs:
|
|||||||
uses: shivammathur/setup-php@v2 #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 }}
|
||||||
|
tools: phpunit-bridge
|
||||||
extensions: mbstring, xml, ctype, iconv, intl, pdo_sqlite
|
extensions: mbstring, xml, ctype, iconv, intl, pdo_sqlite
|
||||||
coverage: xdebug #optional
|
coverage: xdebug #optional
|
||||||
- name: Get composer cache directory
|
- name: Get composer cache directory
|
||||||
@ -31,9 +32,8 @@ jobs:
|
|||||||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
||||||
restore-keys: ${{ runner.os }}-composer-
|
restore-keys: ${{ runner.os }}-composer-
|
||||||
- name: Install Composer dependencies
|
- name: Install Composer dependencies
|
||||||
run: |
|
run: composer install --no-progress --prefer-dist --optimize-autoloader
|
||||||
composer require --dev symfony/phpunit-bridge
|
- name: Install PHPUnit
|
||||||
composer install --no-progress --prefer-dist --optimize-autoloader
|
run: simple-phpunit install
|
||||||
php bin/phpunit install
|
- name: Run tests
|
||||||
- name: Run Tests
|
run: simple-phpunit --coverage-text
|
||||||
run: php bin/phpunit --coverage-text
|
|
||||||
|
Loading…
Reference in New Issue
Block a user