Skip to content

Commit

Permalink
chore(ci): dev deps phpunit
Browse files Browse the repository at this point in the history
  • Loading branch information
soyuka committed Aug 10, 2021
1 parent 0273166 commit 5fe6e6c
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 49 deletions.
60 changes: 32 additions & 28 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 }}
COVERAGE: '0'
SYMFONY_DEPRECATIONS_HELPER: 'disabled=1'
SYMFONY_DEPRECATIONS_HELPER: disabled=1

jobs:
php-cs-fixer:
Expand Down Expand Up @@ -126,9 +126,9 @@ jobs:
path: ${{ steps.composercache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-composer-
# - name: Enable code coverage
# if: matrix.coverage
# run: echo "COVERAGE=1" >> $GITHUB_ENV
- name: Enable code coverage
if: matrix.coverage
run: echo "COVERAGE=1" >> $GITHUB_ENV
- name: Remove Doctrine MongoDB ODM
if: (startsWith(matrix.php, '7.1'))
run: |
Expand All @@ -147,30 +147,34 @@ jobs:
- name: Run PHPUnit tests
run: |
mkdir -p build/logs/phpunit
vendor/bin/simple-phpunit --log-junit build/logs/phpunit/junit.xml
# - name: Upload test artifacts
# if: always()
# uses: actions/upload-artifact@v1
# with:
# name: phpunit-logs-php${{ matrix.php }}
# path: build/logs/phpunit
# continue-on-error: true
# - name: Upload coverage results to Codecov
# if: matrix.coverage
# uses: codecov/codecov-action@v1
# with:
# name: phpunit-php${{ matrix.php }}
# flags: phpunit
# fail_ci_if_error: true
# continue-on-error: true
# - name: Upload coverage results to Coveralls
# if: matrix.coverage
# env:
# COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# run: |
# composer global require --prefer-dist --no-interaction --no-progress --ansi cedx/coveralls
# export PATH="$PATH:$HOME/.composer/vendor/bin"
# coveralls build/logs/phpunit/clover.xml
if [ "$COVERAGE" = '1' ]; then
vendor/bin/simple-phpunit --log-junit build/logs/phpunit/junit.xml --coverage-clover build/logs/phpunit/clover.xml
else
vendor/bin/simple-phpunit --log-junit build/logs/phpunit/junit.xml
fi
- name: Upload test artifacts
if: always()
uses: actions/upload-artifact@v1
with:
name: phpunit-logs-php${{ matrix.php }}
path: build/logs/phpunit
continue-on-error: true
- name: Upload coverage results to Codecov
if: matrix.coverage
uses: codecov/codecov-action@v1
with:
name: phpunit-php${{ matrix.php }}
flags: phpunit
fail_ci_if_error: true
continue-on-error: true
- name: Upload coverage results to Coveralls
if: matrix.coverage
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
composer global require --prefer-dist --no-interaction --no-progress --ansi cedx/coveralls
export PATH="$PATH:$HOME/.composer/vendor/bin"
coveralls build/logs/phpunit/clover.xml
continue-on-error: true

behat:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -938,7 +938,7 @@ public function testGetResult()
$entityManagerProphecy->getClassMetadata(Dummy::class)->willReturn($dummyMetadata);

$queryBuilder = new QueryBuilder($entityManagerProphecy->reveal());
$queryBuilder->select(['o']);
$queryBuilder->select('o');
$queryBuilder->from(Dummy::class, 'o');
$queryBuilder->setFirstResult(0);
$queryBuilder->setMaxResults(42);
Expand Down Expand Up @@ -973,7 +973,7 @@ public function testGetResultWithoutDistinct()
$entityManagerProphecy->getClassMetadata(Dummy::class)->willReturn($dummyMetadata);

$queryBuilder = new QueryBuilder($entityManagerProphecy->reveal());
$queryBuilder->select(['o']);
$queryBuilder->select('o');
$queryBuilder->from(Dummy::class, 'o');
$queryBuilder->setFirstResult(0);
$queryBuilder->setMaxResults(42);
Expand Down Expand Up @@ -1015,7 +1015,7 @@ public function testLegacyGetResult()
$entityManagerProphecy->getClassMetadata(Dummy::class)->willReturn($dummyMetadata);

$queryBuilder = new QueryBuilder($entityManagerProphecy->reveal());
$queryBuilder->select(['o']);
$queryBuilder->select('o');
$queryBuilder->from(Dummy::class, 'o');
$queryBuilder->setFirstResult(0);
$queryBuilder->setMaxResults(42);
Expand Down Expand Up @@ -1056,7 +1056,7 @@ public function testGetResultWithFetchJoinCollection(array $attributes, array $c
$entityManagerProphecy->getClassMetadata(Dummy::class)->willReturn($dummyMetadata);

$queryBuilder = new QueryBuilder($entityManagerProphecy->reveal());
$queryBuilder->select(['o']);
$queryBuilder->select('o');
$queryBuilder->from(Dummy::class, 'o');
$queryBuilder->setFirstResult(0);
$queryBuilder->setMaxResults(42);
Expand Down Expand Up @@ -1112,7 +1112,7 @@ public function testLegacyGetResultWithFetchJoinCollectionDisabled()
$entityManagerProphecy->getClassMetadata(Dummy::class)->willReturn($dummyMetadata);

$queryBuilder = new QueryBuilder($entityManagerProphecy->reveal());
$queryBuilder->select(['o']);
$queryBuilder->select('o');
$queryBuilder->from(Dummy::class, 'o');
$queryBuilder->setFirstResult(0);
$queryBuilder->setMaxResults(42);
Expand Down Expand Up @@ -1159,7 +1159,7 @@ public function testGetResultWithUseOutputWalkers(array $attributes, array $cont
$entityManagerProphecy->getClassMetadata(Dummy::class)->willReturn($dummyMetadata);

$queryBuilder = new QueryBuilder($entityManagerProphecy->reveal());
$queryBuilder->select(['o']);
$queryBuilder->select('o');
$queryBuilder->from(Dummy::class, 'o');
$queryBuilder->setFirstResult(0);
$queryBuilder->setMaxResults(42);
Expand Down Expand Up @@ -1215,7 +1215,7 @@ public function testLegacyGetResultWithUseOutputWalkersDisabled()
$entityManagerProphecy->getClassMetadata(Dummy::class)->willReturn($dummyMetadata);

$queryBuilder = new QueryBuilder($entityManagerProphecy->reveal());
$queryBuilder->select(['o']);
$queryBuilder->select('o');
$queryBuilder->from(Dummy::class, 'o');
$queryBuilder->setFirstResult(0);
$queryBuilder->setMaxResults(42);
Expand Down Expand Up @@ -1259,7 +1259,7 @@ public function testGetResultWithPartial()
$entityManagerProphecy->getClassMetadata(Dummy::class)->willReturn($dummyMetadata);

$queryBuilder = new QueryBuilder($entityManagerProphecy->reveal());
$queryBuilder->select(['o']);
$queryBuilder->select('o');
$queryBuilder->from(Dummy::class, 'o');
$queryBuilder->setFirstResult(0);
$queryBuilder->setMaxResults(42);
Expand Down Expand Up @@ -1299,7 +1299,7 @@ public function testLegacyGetResultWithPartial()
$entityManagerProphecy->getClassMetadata(Dummy::class)->willReturn($dummyMetadata);

$queryBuilder = new QueryBuilder($entityManagerProphecy->reveal());
$queryBuilder->select(['o']);
$queryBuilder->select('o');
$queryBuilder->from(Dummy::class, 'o');
$queryBuilder->setFirstResult(0);
$queryBuilder->setMaxResults(42);
Expand Down Expand Up @@ -1337,7 +1337,7 @@ public function testSimpleGetResult()
$entityManagerProphecy->getClassMetadata(Dummy::class)->willReturn($dummyMetadata);

$queryBuilder = new QueryBuilder($entityManagerProphecy->reveal());
$queryBuilder->select(['o']);
$queryBuilder->select('o');
$queryBuilder->from(Dummy::class, 'o');
$queryBuilder->setFirstResult(0);
$queryBuilder->setMaxResults(42);
Expand Down Expand Up @@ -1376,7 +1376,7 @@ public function testLegacySimpleGetResult()
$entityManagerProphecy->getClassMetadata(Dummy::class)->willReturn($dummyMetadata);

$queryBuilder = new QueryBuilder($entityManagerProphecy->reveal());
$queryBuilder->select(['o']);
$queryBuilder->select('o');
$queryBuilder->from(Dummy::class, 'o');
$queryBuilder->setFirstResult(0);
$queryBuilder->setMaxResults(42);
Expand Down
20 changes: 10 additions & 10 deletions tests/Core/Bridge/Doctrine/Orm/Util/QueryCheckerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public function testHasOrderByOnFetchJoinedToManyAssociationWithoutJoin()
$entityManagerProphecy = $this->prophesize(EntityManagerInterface::class);

$queryBuilder = new QueryBuilder($entityManagerProphecy->reveal());
$queryBuilder->select(['d']);
$queryBuilder->select('d');
$queryBuilder->from(Dummy::class, 'd');
$queryBuilder->orderBy('d.name', 'ASC');

Expand All @@ -136,7 +136,7 @@ public function testHasOrderByOnFetchJoinedToManyAssociationWithoutOrderBy()
$entityManagerProphecy = $this->prophesize(EntityManagerInterface::class);

$queryBuilder = new QueryBuilder($entityManagerProphecy->reveal());
$queryBuilder->select(['d', 'a_1']);
$queryBuilder->select('d', 'a_1');
$queryBuilder->from(Dummy::class, 'd');
$queryBuilder->leftJoin('d.relatedDummies', 'a_1');

Expand Down Expand Up @@ -164,7 +164,7 @@ public function testHasOrderByOnFetchJoinedToManyAssociationNotFetchJoined()
$entityManagerProphecy->getClassMetadata(RelatedDummy::class)->willReturn($relatedDummyMetadata);

$queryBuilder = new QueryBuilder($entityManagerProphecy->reveal());
$queryBuilder->select(['d', 'a_2']);
$queryBuilder->select('d', 'a_2');
$queryBuilder->from(Dummy::class, 'd');
$queryBuilder->leftJoin('d.relatedDummies', 'a_1');
$queryBuilder->leftJoin('d.relatedDummy', 'a_2');
Expand Down Expand Up @@ -192,7 +192,7 @@ public function testHasOrderByOnFetchJoinedToManyAssociationWithJoinByAssociatio
$entityManagerProphecy->getClassMetadata(RelatedDummy::class)->willReturn($relatedDummyMetadata);

$queryBuilder = new QueryBuilder($entityManagerProphecy->reveal());
$queryBuilder->select(['d', 'a_1']);
$queryBuilder->select('d', 'a_1');
$queryBuilder->from(Dummy::class, 'd');
$queryBuilder->leftJoin('d.relatedDummies', 'a_1');
$queryBuilder->orderBy('a_1.name', 'ASC');
Expand All @@ -213,7 +213,7 @@ public function testHasOrderByOnToManyJoinWithoutJoin()
$entityManagerProphecy = $this->prophesize(EntityManagerInterface::class);

$queryBuilder = new QueryBuilder($entityManagerProphecy->reveal());
$queryBuilder->select(['d']);
$queryBuilder->select('d');
$queryBuilder->from(Dummy::class, 'd');
$queryBuilder->orderBy('d.name', 'ASC');

Expand All @@ -231,7 +231,7 @@ public function testHasOrderByOnToManyJoinWithoutOrderBy()
$entityManagerProphecy = $this->prophesize(EntityManagerInterface::class);

$queryBuilder = new QueryBuilder($entityManagerProphecy->reveal());
$queryBuilder->select(['d', 'a_1']);
$queryBuilder->select('d', 'a_1');
$queryBuilder->from(Dummy::class, 'd');
$queryBuilder->leftJoin('d.relatedDummies', 'a_1');

Expand Down Expand Up @@ -263,7 +263,7 @@ public function testHasOrderByOnToManyJoinNotFetchJoined()
$entityManagerProphecy->getClassMetadata(RelatedDummy::class)->willReturn($relatedDummyMetadata);

$queryBuilder = new QueryBuilder($entityManagerProphecy->reveal());
$queryBuilder->select(['d', 'a_2']);
$queryBuilder->select('d', 'a_2');
$queryBuilder->from(Dummy::class, 'd');
$queryBuilder->leftJoin('d.relatedDummies', 'a_1');
$queryBuilder->leftJoin('d.relatedDummy', 'a_2');
Expand Down Expand Up @@ -295,7 +295,7 @@ public function testHasOrderByOnToManyWithJoinByAssociation()
$entityManagerProphecy->getClassMetadata(RelatedDummy::class)->willReturn($relatedDummyMetadata);

$queryBuilder = new QueryBuilder($entityManagerProphecy->reveal());
$queryBuilder->select(['d', 'a_1']);
$queryBuilder->select('d', 'a_1');
$queryBuilder->from(Dummy::class, 'd');
$queryBuilder->leftJoin('d.relatedDummies', 'a_1');
$queryBuilder->orderBy('a_1.name', 'ASC');
Expand All @@ -312,7 +312,7 @@ public function testHasJoinedToManyAssociationWithoutJoin()
$entityManagerProphecy = $this->prophesize(EntityManagerInterface::class);

$queryBuilder = new QueryBuilder($entityManagerProphecy->reveal());
$queryBuilder->select(['d']);
$queryBuilder->select('d');
$queryBuilder->from(Dummy::class, 'd');

$managerRegistryProphecy = $this->prophesize(ManagerRegistry::class);
Expand All @@ -335,7 +335,7 @@ public function testHasJoinedToManyAssociationWithJoinByAssociation()
$entityManagerProphecy->getClassMetadata(RelatedDummy::class)->willReturn($relatedDummyMetadata);

$queryBuilder = new QueryBuilder($entityManagerProphecy->reveal());
$queryBuilder->select(['d']);
$queryBuilder->select('d');
$queryBuilder->from(Dummy::class, 'd');
$queryBuilder->leftJoin('d.relatedDummies', 'a_1');

Expand Down

0 comments on commit 5fe6e6c

Please sign in to comment.