Skip to content

Commit

Permalink
Merge pull request #735 from franmomu/fix_coverage
Browse files Browse the repository at this point in the history
Fix coverage build
  • Loading branch information
malarzm authored May 9, 2022
2 parents 3d765d3 + d8018ef commit 0579f60
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 8 deletions.
8 changes: 1 addition & 7 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,20 +99,14 @@ jobs:
with:
dependency-versions: "${{ matrix.dependencies }}"

- name: "Run PHPUnit with coverage"
- name: "Run PHPUnit"
run: "vendor/bin/phpunit --coverage-clover=coverage.xml"
if: "${{ matrix.php-version != '8.0' }}"

- name: "Run PHPUnit without coverage"
run: "vendor/bin/phpunit"
if: "${{ matrix.php-version == '8.0' }}"

- name: "Upload coverage file"
uses: "actions/upload-artifact@v2"
with:
name: "phpunit-${{ matrix.php-version }}.coverage"
path: "coverage.xml"
if: "${{ matrix.php-version != '8.0' }}"

upload_coverage:
name: "Upload coverage to Codecov"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
strategy:
matrix:
php-version:
- "8.0"
- "8.1"

steps:
- name: "Checkout code"
Expand Down
1 change: 1 addition & 0 deletions Repository/ContainerRepositoryFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ private function getOrCreateRepository(DocumentManager $documentManager, ClassMe
/** @psalm-var class-string<GridFSRepository<T>> $repositoryClassName */
$repositoryClassName = $documentManager->getConfiguration()->getDefaultGridFSRepositoryClassName();
} else {
/** @psalm-var class-string<ObjectRepository<T>> $repositoryClassName */
$repositoryClassName = $documentManager->getConfiguration()->getDefaultDocumentRepositoryClassName();
}

Expand Down
1 change: 1 addition & 0 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
<exclude>
<directory>./Resources</directory>
<directory>./Tests</directory>
<directory>./vendor</directory>
</exclude>
</whitelist>
</filter>
Expand Down

0 comments on commit 0579f60

Please sign in to comment.