mirror of
https://github.com/shivammathur/setup-php.git
synced 2024-11-22 11:51:07 +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
|
||||
with:
|
||||
php-version: ${{ matrix.php-versions }}
|
||||
tools: phpunit-bridge
|
||||
extensions: mbstring, xml, ctype, iconv, intl, pdo_sqlite, mysql
|
||||
coverage: xdebug #optional
|
||||
- name: Start mysql service
|
||||
@ -42,15 +43,15 @@ jobs:
|
||||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
||||
restore-keys: ${{ runner.os }}-composer-
|
||||
- name: Install Composer dependencies
|
||||
run: |
|
||||
composer require --dev symfony/orm-pack symfony/phpunit-bridge
|
||||
composer install --no-progress --prefer-dist --optimize-autoloader
|
||||
php bin/phpunit install
|
||||
run: composer install --no-progress --prefer-dist --optimize-autoloader
|
||||
- name: Run Migration
|
||||
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:migrations:migrate || echo "No migrations found or migration failed"
|
||||
env:
|
||||
DATABASE_URL: mysql://root:symfony@127.0.0.1:${{ job.services.mysql.ports['3306'] }}/symfony
|
||||
- name: Run Tests
|
||||
run: php bin/phpunit --coverage-text
|
||||
- name: Install PHPUnit
|
||||
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
|
||||
with:
|
||||
php-version: ${{ matrix.php-versions }}
|
||||
tools: phpunit-bridge
|
||||
extensions: mbstring, xml, ctype, iconv, intl, pdo_sqlite, pgsql
|
||||
coverage: xdebug #optional
|
||||
- name: Get composer cache directory
|
||||
@ -40,15 +41,15 @@ jobs:
|
||||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
||||
restore-keys: ${{ runner.os }}-composer-
|
||||
- name: Install Composer dependencies
|
||||
run: |
|
||||
composer require --dev symfony/orm-pack symfony/phpunit-bridge
|
||||
composer install --no-progress --prefer-dist --optimize-autoloader
|
||||
php bin/phpunit install
|
||||
run: composer install --no-progress --prefer-dist --optimize-autoloader
|
||||
- name: Run Migration
|
||||
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:migrations:migrate || echo "No migrations found or migration failed"
|
||||
env:
|
||||
DATABASE_URL: postgres://postgres:postgres@127.0.0.1:${{ job.services.postgres.ports[5432] }}/postgres?charset=UTF-8
|
||||
- name: Run Tests
|
||||
run: php bin/phpunit --coverage-text
|
||||
- name: Install PHPUnit
|
||||
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
|
||||
with:
|
||||
php-version: ${{ matrix.php-versions }}
|
||||
tools: phpunit-bridge
|
||||
extensions: mbstring, xml, ctype, iconv, intl, pdo_sqlite
|
||||
coverage: xdebug #optional
|
||||
- name: Get composer cache directory
|
||||
@ -31,9 +32,8 @@ jobs:
|
||||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
||||
restore-keys: ${{ runner.os }}-composer-
|
||||
- name: Install Composer dependencies
|
||||
run: |
|
||||
composer require --dev symfony/phpunit-bridge
|
||||
composer install --no-progress --prefer-dist --optimize-autoloader
|
||||
php bin/phpunit install
|
||||
- name: Run Tests
|
||||
run: php bin/phpunit --coverage-text
|
||||
run: composer install --no-progress --prefer-dist --optimize-autoloader
|
||||
- name: Install PHPUnit
|
||||
run: simple-phpunit install
|
||||
- name: Run tests
|
||||
run: simple-phpunit --coverage-text
|
||||
|
Loading…
Reference in New Issue
Block a user