Skip to content

Commit 17c5199

Browse files
authored
Fix GH Actions (#534)
1 parent 34e9804 commit 17c5199

File tree

4 files changed

+47
-9
lines changed

4 files changed

+47
-9
lines changed

.github/workflows/ci.yml

+43-5
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
env:
88
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
99
SHELL_VERBOSITY: 1
10-
OCULAR_BIN: $HOME/.bin/ocular.phar
10+
OCULAR_BIN: ocular.phar
1111

1212
jobs:
1313
php-cs-fixer:
@@ -52,6 +52,7 @@ jobs:
5252
- name: Setup MySQL
5353
run: |
5454
sudo systemctl start mysql.service
55+
mysqladmin -u root -proot password ''
5556
mysql -u root -e 'create database hautelook_alice_bundle;'
5657
- name: Setup coverage
5758
if: matrix.coverage
@@ -81,14 +82,51 @@ jobs:
8182
run: composer config platform.php 7.4.99
8283
- name: Update project dependencies
8384
run: composer update --no-interaction --no-progress --prefer-dist --ansi
84-
- name: Clear test app cache
85-
run: tests/Fixtures/app/console cache:clear --ansi
8685
- name: Run tests
87-
if: !matrix.coverage
86+
if: '!matrix.coverage'
8887
run: vendor/bin/phpunit --verbose --stop-on-failure
8988
- name: Run tests
9089
if: matrix.coverage
9190
run: vendor/bin/phpunit --verbose --stop-on-failure --coverage-text --coverage-clover=coverage.xml
9291
- name: Upload coverage
9392
if: matrix.coverage
94-
run: $OCULAR_BIN code-coverage:upload --format=php-clover coverage.xml
93+
run: php $OCULAR_BIN code-coverage:upload --format=php-clover coverage.xml
94+
95+
phpunit-lowest:
96+
name: PHPUnit (PHP ${{ matrix.php }} lowest deps)
97+
runs-on: ubuntu-latest
98+
timeout-minutes: 20
99+
strategy:
100+
matrix:
101+
php:
102+
- '7.3'
103+
fail-fast: false
104+
steps:
105+
- name: Checkout
106+
uses: actions/checkout@v2
107+
- name: Setup MySQL
108+
run: |
109+
sudo systemctl start mysql.service
110+
mysqladmin -u root -proot password ''
111+
mysql -u root -e 'create database hautelook_alice_bundle;'
112+
- name: Setup PHP
113+
uses: shivammathur/setup-php@v2
114+
with:
115+
php-version: ${{ matrix.php }}
116+
tools: pecl, composer
117+
extensions: intl, bcmath, curl, openssl, mbstring
118+
coverage: pcov
119+
ini-values: memory_limit=-1
120+
- name: Get composer cache directory
121+
id: composercache
122+
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
123+
- name: Cache dependencies
124+
uses: actions/cache@v2
125+
with:
126+
path: ${{ steps.composercache.outputs.dir }}
127+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
128+
restore-keys: ${{ runner.os }}-composer-
129+
- name: Update project dependencies
130+
run: composer update --no-interaction --no-progress --prefer-lowest --ansi
131+
- name: Run tests
132+
run: vendor/bin/phpunit --verbose --stop-on-failure

src/Console/Command/Doctrine/DoctrineOrmLoadDataFixturesCommand.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -141,15 +141,15 @@ protected function execute(InputInterface $input, OutputInterface $output)
141141
if (!$noBundles) {
142142
@trigger_error(
143143
'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',
144-
E_USER_DEPRECATED
144+
\E_USER_DEPRECATED
145145
);
146146
}
147147

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

tests/PhpUnit/ReloadDatabaseTraitTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@
2020
*/
2121
class ReloadDatabaseTraitTest extends KernelTestCase
2222
{
23-
use ReloadDatabaseTrait;
2423
use RefreshTestTrait;
24+
use ReloadDatabaseTrait;
2525
}

tests/Resolver/File/KernelFileResolverTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class KernelFileResolverTest extends TestCase
3232
/**
3333
* {@inheritdoc}
3434
*/
35-
public function tearDown(): void
35+
protected function tearDown(): void
3636
{
3737
if (null !== $this->kernel) {
3838
$this->kernel->shutdown();

0 commit comments

Comments
 (0)