Skip to content

Commit

Permalink
Add debug line
Browse files Browse the repository at this point in the history
  • Loading branch information
xvilo committed Dec 18, 2023
1 parent e77d36d commit c7fded8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/phpunit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
with:
php-version: ${{ matrix.php-version }}
tools: phpunit-bridge
extensions: mbstring, xml, ctype, iconv, intl, pdo_sqlite, pgsql
extensions: mbstring, xml, ctype, iconv, intl, pdo_sqlite, pgsql, zip
coverage: xdebug

- name: Get composer cache directory
Expand Down Expand Up @@ -65,6 +65,6 @@ jobs:
DATABASE_URL: postgres://postgres:[email protected]:${{ job.services.postgres.ports[5432] }}/postgres?charset=UTF-8

- name: Run tests
run: php vendor/bin/phpunit --coverage-text
run: git status && php vendor/bin/phpunit tests/Unit/Service/PackageSynchronizer/ComposerPackageSynchronizerTest.php --testdox --filter testSynchronizePackageWithGitLabToken
env:
DATABASE_URL: postgres://postgres:[email protected]:${{ job.services.postgres.ports[5432] }}/postgres?charset=UTF-8
DATABASE_URL: postgres://postgres:[email protected]:${{ job.services.postgres.ports[5432] }}/postgres?charset=UTF-8
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,8 @@ public function synchronize(Package $package): void

$this->packageManager->saveProvider($json, $package->organizationAlias(), $name);
} catch (\Throwable $exception) {
// TODO: Remove debug line
throw $exception;
$package->syncFailure(sprintf('Error: %s%s',

Check failure on line 223 in src/Service/PackageSynchronizer/ComposerPackageSynchronizer.php

View workflow job for this annotation

GitHub Actions / PHP 7.4 | PostgreSQL 11

Unreachable statement - code above always terminates.

Check failure on line 223 in src/Service/PackageSynchronizer/ComposerPackageSynchronizer.php

View workflow job for this annotation

GitHub Actions / PHP 8.0 | PostgreSQL 11

Unreachable statement - code above always terminates.
$exception->getMessage(),
isset($io) && strlen($io->getOutput()) > 1 ? "\nLogs:\n".$io->getOutput() : ''
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,11 @@ public function testSynchronizePackageWithGitLabToken(): void
@unlink($path);

$package = PackageMother::withOrganizationAndToken('gitlab', $this->resourcesDir.'artifacts', 'buddy');
dump($package);

Check failure on line 140 in tests/Unit/Service/PackageSynchronizer/ComposerPackageSynchronizerTest.php

View workflow job for this annotation

GitHub Actions / PHP 7.4 | PostgreSQL 11

Should not use function "dump", please change the code.

Check failure on line 140 in tests/Unit/Service/PackageSynchronizer/ComposerPackageSynchronizerTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.0 | PostgreSQL 11

Should not use function "dump", please change the code.
$this->synchronizer->synchronize($package);

dd($package);

Check failure on line 143 in tests/Unit/Service/PackageSynchronizer/ComposerPackageSynchronizerTest.php

View workflow job for this annotation

GitHub Actions / PHP 7.4 | PostgreSQL 11

Should not use function "dd", please change the code.

Check failure on line 143 in tests/Unit/Service/PackageSynchronizer/ComposerPackageSynchronizerTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.0 | PostgreSQL 11

Should not use function "dd", please change the code.

self::assertTrue($package->isSynchronizedSuccessfully(), (string) $this->getProperty($package, 'lastSyncError'));

Check failure on line 145 in tests/Unit/Service/PackageSynchronizer/ComposerPackageSynchronizerTest.php

View workflow job for this annotation

GitHub Actions / PHP 7.4 | PostgreSQL 11

Unreachable statement - code above always terminates.

Check failure on line 145 in tests/Unit/Service/PackageSynchronizer/ComposerPackageSynchronizerTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.0 | PostgreSQL 11

Unreachable statement - code above always terminates.
self::assertFileExists($path);

Expand Down

0 comments on commit c7fded8

Please sign in to comment.