Skip to content

Commit

Permalink
ci: Update coveralls workflow (#1109)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasnorre authored Oct 8, 2024
1 parent 9aafd39 commit 4363cd1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 17 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/Coveralls.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ jobs:
name: Build
runs-on: ubuntu-latest
steps:
- name: Set up MySQL 5.7
- name: Set up MySQL 8.0
uses: mirromutth/[email protected]
with:
mysql version: 5.7
mysql version: 8.0
mysql root password: 'root'

- name: Checkout
Expand All @@ -35,12 +35,12 @@ jobs:
- name: Unit Tests
run: |
export "UNIT_XML"=Tests/UnitTests.xml
.Build/bin/phpunit --coverage-filter Classes --coverage-clover=unittest-coverage.clover --colors -c $UNIT_XML Tests/Unit
XDEBUG_MODE=coverage .Build/bin/phpunit --coverage-filter Classes --coverage-clover=unittest-coverage.clover --colors -c $UNIT_XML Tests/Unit
- name: Functional Tests
run: |
export "FUNCTIONAL_XML"=Tests/FunctionalTests.xml
.Build/bin/phpunit --coverage-filter Classes --coverage-clover=functional-coverage.clover --colors -c $FUNCTIONAL_XML Tests/Functional --process-isolation
XDEBUG_MODE=coverage .Build/bin/phpunit --coverage-filter Classes --coverage-clover=functional-coverage.clover --colors -c $FUNCTIONAL_XML Tests/Functional --process-isolation
env:
typo3DatabaseHost: 127.0.0.1
typo3DatabaseName: typo3
Expand All @@ -49,8 +49,8 @@ jobs:

- name: Upload coverage results to Coveralls
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
run: |
composer global require php-coveralls/php-coveralls --no-progress --no-suggest --no-interaction
/home/runner/.composer/vendor/bin/php-coveralls -c .coveralls.yml -vvv --json_path=var/log/coveralls-upload.json
continue-on-error: true
/home/runner/.composer/vendor/bin/php-coveralls -c .coveralls.yml -vvv --json_path=Tests/coveralls-upload.json
#continue-on-error: true
10 changes: 0 additions & 10 deletions Classes/CrawlStrategy/SubProcessExecutionStrategy.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,16 +57,6 @@ public function fetchUrlContents(UriInterface $url, string $crawlerId)
$url = (string) $url;
$parsedUrl = parse_url($url);

if ($parsedUrl === false) {
$this->logger?->debug(
sprintf('Could not parse_url() for string "%s"', $url),
[
'crawlerId' => $crawlerId,
]
);
return false;
}

if (!isset($parsedUrl['scheme']) || !in_array($parsedUrl['scheme'], ['', 'http', 'https'], true)) {

Check warning on line 60 in Classes/CrawlStrategy/SubProcessExecutionStrategy.php

View workflow job for this annotation

GitHub Actions / Mutation tests (8.1, ubuntu-latest)

Escaped Mutant for Mutator "LogicalNot": --- Original +++ New @@ @@ { $url = (string) $url; $parsedUrl = parse_url($url); - if (!isset($parsedUrl['scheme']) || !in_array($parsedUrl['scheme'], ['', 'http', 'https'], true)) { + if (isset($parsedUrl['scheme']) || !in_array($parsedUrl['scheme'], ['', 'http', 'https'], true)) { $this->logger?->debug(sprintf('Scheme does not match for url "%s"', $url), ['crawlerId' => $crawlerId]); return false; }

Check warning on line 60 in Classes/CrawlStrategy/SubProcessExecutionStrategy.php

View workflow job for this annotation

GitHub Actions / Mutation tests (8.1, ubuntu-latest)

Escaped Mutant for Mutator "LogicalNot": --- Original +++ New @@ @@ { $url = (string) $url; $parsedUrl = parse_url($url); - if (!isset($parsedUrl['scheme']) || !in_array($parsedUrl['scheme'], ['', 'http', 'https'], true)) { + if (!isset($parsedUrl['scheme']) || in_array($parsedUrl['scheme'], ['', 'http', 'https'], true)) { $this->logger?->debug(sprintf('Scheme does not match for url "%s"', $url), ['crawlerId' => $crawlerId]); return false; }

Check warning on line 60 in Classes/CrawlStrategy/SubProcessExecutionStrategy.php

View workflow job for this annotation

GitHub Actions / Mutation tests (8.1, ubuntu-latest)

Escaped Mutant for Mutator "ArrayItemRemoval": --- Original +++ New @@ @@ { $url = (string) $url; $parsedUrl = parse_url($url); - if (!isset($parsedUrl['scheme']) || !in_array($parsedUrl['scheme'], ['', 'http', 'https'], true)) { + if (!isset($parsedUrl['scheme']) || !in_array($parsedUrl['scheme'], ['http', 'https'], true)) { $this->logger?->debug(sprintf('Scheme does not match for url "%s"', $url), ['crawlerId' => $crawlerId]); return false; }

Check warning on line 60 in Classes/CrawlStrategy/SubProcessExecutionStrategy.php

View workflow job for this annotation

GitHub Actions / Mutation tests (8.1, ubuntu-latest)

Escaped Mutant for Mutator "LogicalOr": --- Original +++ New @@ @@ { $url = (string) $url; $parsedUrl = parse_url($url); - if (!isset($parsedUrl['scheme']) || !in_array($parsedUrl['scheme'], ['', 'http', 'https'], true)) { + if (!isset($parsedUrl['scheme']) && !in_array($parsedUrl['scheme'], ['', 'http', 'https'], true)) { $this->logger?->debug(sprintf('Scheme does not match for url "%s"', $url), ['crawlerId' => $crawlerId]); return false; }
$this->logger?->debug(sprintf('Scheme does not match for url "%s"', $url), [
'crawlerId' => $crawlerId,
Expand Down

0 comments on commit 4363cd1

Please sign in to comment.