Skip to content

Commit

Permalink
Improve symfony examples
Browse files Browse the repository at this point in the history
  • Loading branch information
shivammathur committed Jul 17, 2021
1 parent c88f076 commit 6a8a2ab
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 18 deletions.
13 changes: 7 additions & 6 deletions examples/symfony-mysql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
13 changes: 7 additions & 6 deletions examples/symfony-postgres.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
12 changes: 6 additions & 6 deletions examples/symfony.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

0 comments on commit 6a8a2ab

Please sign in to comment.