Skip to content

Commit

Permalink
update AutoReview
Browse files Browse the repository at this point in the history
  • Loading branch information
keradus committed Nov 2, 2023
1 parent bcbc642 commit 34f0084
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ jobs:
PHP_CS_FIXER_FUTURE_MODE: 1
run: php php-cs-fixer check --diff -v

deployment-checks:
deployment:
needs: tests
strategy:
fail-fast: false
Expand Down
8 changes: 3 additions & 5 deletions tests/AutoReview/CiConfigurationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,7 @@ private static function assertSupportedPhpVersionsAreCoveredByCiJobs(array $supp
*/
private function getAllPhpVersionsUsedByCiForDeployments(): array
{
$jobs = array_filter($this->getGitHubJobs(), static fn (array $job): bool => isset($job['execute-deployment']) && 'yes' === $job['execute-deployment']);

return array_map(static fn ($job): string => \is_string($job['php-version']) ? $job['php-version'] : sprintf('%.1f', $job['php-version']), $jobs);
return array_map(static fn ($job): string => \is_string($job['php-version']) ? $job['php-version'] : sprintf('%.1f', $job['php-version']), $this->getGitHubDeploymentJobs());
}

/**
Expand Down Expand Up @@ -216,11 +214,11 @@ private function getMinPhpVersionFromEntryFile(): string
/**
* @return list<array<string, scalar>>
*/
private function getGitHubJobs(): array
private function getGitHubDeploymentJobs(): array
{
$yaml = Yaml::parse(file_get_contents(__DIR__.'/../../.github/workflows/ci.yml'));

return $yaml['jobs']['tests']['strategy']['matrix']['include'];
return $yaml['jobs']['deployment']['strategy']['matrix']['include'];
}

/**
Expand Down

0 comments on commit 34f0084

Please sign in to comment.