From 96321e02df0b7c85d864f90cf58449190d60dfaf Mon Sep 17 00:00:00 2001 From: Jan Nedbal Date: Tue, 19 Nov 2024 12:45:31 +0100 Subject: [PATCH] E2E: refresh, keep only green setup (#201) --- .github/workflows/e2e.yml | 31 +++++++++++++++++++------------ scripts/refresh-e2e.php | 23 ++++++++++++++++++++++- 2 files changed, 41 insertions(+), 13 deletions(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 696102a..d07dc14 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -24,24 +24,27 @@ jobs: repo: cdn77/RabbitMQBundle - repo: contao/contao - cdaArgs: --config=depcheck.php + cdaArgs: --disable-ext-analysis --config=depcheck.php - repo: idleberg/php-vite-manifest + cdaArgs: --disable-ext-analysis - repo: idleberg/php-wordpress-vite-assets - repo: inspirum/arrayable-php - repo: inspirum/balikobot-php + cdaArgs: --disable-ext-analysis - repo: inspirum/balikobot-php-symfony - repo: inspirum/xml-php + cdaArgs: --disable-ext-analysis - repo: kreait/firebase-php - repo: numero2/contao-marketing-suite - cdaArgs: --config=depcheck.php + cdaArgs: --disable-ext-analysis --config=depcheck.php - repo: numero2/contao-opengraph3 cdaArgs: --config=depcheck.php @@ -56,26 +59,33 @@ jobs: - repo: oveleon/contao-cookiebar composerArgs: --no-plugins - cdaArgs: --config=depcheck.php + cdaArgs: --disable-ext-analysis --config=depcheck.php - repo: oveleon/contao-glossary-bundle composerArgs: --no-plugins - cdaArgs: --config=depcheck.php + cdaArgs: --disable-ext-analysis --config=depcheck.php - repo: oveleon/contao-theme-compiler-bundle composerArgs: --no-plugins - cdaArgs: --config=depcheck.php + cdaArgs: --disable-ext-analysis --config=depcheck.php - repo: phpstan/phpstan-src - cdaArgs: --config=build/composer-dependency-analyser.php + cdaArgs: --disable-ext-analysis --config=build/composer-dependency-analyser.php - repo: qossmic/deptrac-src + cdaArgs: --disable-ext-analysis - repo: rectorphp/rector-src - repo: rectorphp/swiss-knife + - + repo: sensiolabs/GotenbergBundle + - + repo: shapecode/cron-bundle - repo: shipmonk-rnd/dead-code-detector + - + repo: shipmonk-rnd/doctrine-entity-preloader - repo: shipmonk-rnd/doctrine-hint-driven-sql-walker - @@ -90,11 +100,13 @@ jobs: repo: shipmonk-rnd/name-collision-detector - repo: shipmonk-rnd/phpstan-rules + - + repo: symplify/config-transformer - repo: teamneusta/pimcore-testing-framework - repo: wallabag/wallabag - + cdaArgs: --disable-ext-analysis fail-fast: false steps: - @@ -141,11 +153,6 @@ jobs: working-directory: ${{ matrix.repo }} run: composer install --no-progress --no-interaction --ignore-platform-reqs ${{ matrix.composerArgs }} - - - name: Run analyser (--disable-ext-analysis) - working-directory: ${{ matrix.repo }} - run: php ../../analyser/bin/composer-dependency-analyser --show-all-usages --disable-ext-analysis ${{ matrix.cdaArgs }} - - name: Run analyser working-directory: ${{ matrix.repo }} diff --git a/scripts/refresh-e2e.php b/scripts/refresh-e2e.php index 2c283bf..d4d68c3 100644 --- a/scripts/refresh-e2e.php +++ b/scripts/refresh-e2e.php @@ -19,6 +19,11 @@ function fetchDependents(string $packageName, int $page = 1): array foreach ($packages as $package) { $packageName = $package['name']; $downloads = $package['downloads'] ?? 0; + $abandoned = (bool) ($package['abandoned'] ?? false); + + if ($abandoned) { + continue; + } if ($downloads < 2000) { continue; @@ -51,7 +56,7 @@ function outputYaml(array $items): void echo " -\n"; foreach ($item as $key => $value) { - echo " $key: $value\n"; + echo " $key: " . trim($value) . "\n"; } } } @@ -102,6 +107,22 @@ function outputYaml(array $items): void ) { unset($result[$index]); // failing builds } + + if ( + $item['repo'] === 'wallabag/wallabag' + || $item['repo'] === 'oveleon/contao-theme-compiler-bundle' + || $item['repo'] === 'oveleon/contao-glossary-bundle' + || $item['repo'] === 'oveleon/contao-cookiebar' + || $item['repo'] === 'numero2/contao-marketing-suite' + || $item['repo'] === 'inspirum/xml-php' + || $item['repo'] === 'inspirum/balikobot-php' + || $item['repo'] === 'idleberg/php-vite-manifest' + || $item['repo'] === 'contao/contao' + || $item['repo'] === 'qossmic/deptrac-src' + || $item['repo'] === 'phpstan/phpstan-src' + ) { + $item['cdaArgs'] = '--disable-ext-analysis ' . ($item['cdaArgs'] ?? ''); + } } usort($result, static function (array $a, array $b): int {