[go: nahoru, domu]

Skip to content

Commit

Permalink
Fix GH Actions (#534)
Browse files Browse the repository at this point in the history
  • Loading branch information
soyuka authored Feb 23, 2021
1 parent 34e9804 commit 17c5199
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 9 deletions.
48 changes: 43 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
env:
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SHELL_VERBOSITY: 1
OCULAR_BIN: $HOME/.bin/ocular.phar
OCULAR_BIN: ocular.phar

jobs:
php-cs-fixer:
Expand Down Expand Up @@ -52,6 +52,7 @@ jobs:
- name: Setup MySQL
run: |
sudo systemctl start mysql.service
mysqladmin -u root -proot password ''
mysql -u root -e 'create database hautelook_alice_bundle;'
- name: Setup coverage
if: matrix.coverage
Expand Down Expand Up @@ -81,14 +82,51 @@ jobs:
run: composer config platform.php 7.4.99
- name: Update project dependencies
run: composer update --no-interaction --no-progress --prefer-dist --ansi
- name: Clear test app cache
run: tests/Fixtures/app/console cache:clear --ansi
- name: Run tests
if: !matrix.coverage
if: '!matrix.coverage'
run: vendor/bin/phpunit --verbose --stop-on-failure
- name: Run tests
if: matrix.coverage
run: vendor/bin/phpunit --verbose --stop-on-failure --coverage-text --coverage-clover=coverage.xml
- name: Upload coverage
if: matrix.coverage
run: $OCULAR_BIN code-coverage:upload --format=php-clover coverage.xml
run: php $OCULAR_BIN code-coverage:upload --format=php-clover coverage.xml

phpunit-lowest:
name: PHPUnit (PHP ${{ matrix.php }} lowest deps)
runs-on: ubuntu-latest
timeout-minutes: 20
strategy:
matrix:
php:
- '7.3'
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup MySQL
run: |
sudo systemctl start mysql.service
mysqladmin -u root -proot password ''
mysql -u root -e 'create database hautelook_alice_bundle;'
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: pecl, composer
extensions: intl, bcmath, curl, openssl, mbstring
coverage: pcov
ini-values: memory_limit=-1
- name: Get composer cache directory
id: composercache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache dependencies
uses: actions/cache@v2
with:
path: ${{ steps.composercache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-composer-
- name: Update project dependencies
run: composer update --no-interaction --no-progress --prefer-lowest --ansi
- name: Run tests
run: vendor/bin/phpunit --verbose --stop-on-failure
Original file line number Diff line number Diff line change
Expand Up @@ -141,15 +141,15 @@ protected function execute(InputInterface $input, OutputInterface $output)
if (!$noBundles) {
@trigger_error(
'The configuration parameter hautelook_alice.root_dirs should be used to specify the directories to include. If done or if you do not need to load bundle\'s fixtures, use the --no-bundles option',
E_USER_DEPRECATED
\E_USER_DEPRECATED
);
}

$bundles = $input->getOption('bundle');
if ($bundles) {
@trigger_error(
'The option --bundle is deprecated. Use the configuration parameter hautelook_alice.root_dirs to include the desired directories instead',
E_USER_DEPRECATED
\E_USER_DEPRECATED
);
}

Expand Down
2 changes: 1 addition & 1 deletion tests/PhpUnit/ReloadDatabaseTraitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
*/
class ReloadDatabaseTraitTest extends KernelTestCase
{
use ReloadDatabaseTrait;
use RefreshTestTrait;
use ReloadDatabaseTrait;
}
2 changes: 1 addition & 1 deletion tests/Resolver/File/KernelFileResolverTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class KernelFileResolverTest extends TestCase
/**
* {@inheritdoc}
*/
public function tearDown(): void
protected function tearDown(): void
{
if (null !== $this->kernel) {
$this->kernel->shutdown();
Expand Down

0 comments on commit 17c5199

Please sign in to comment.