From a0b33d30db775171722cde7b46c1163c6660c5b9 Mon Sep 17 00:00:00 2001 From: Adam <607975+adam-vessey@users.noreply.github.com> Date: Tue, 7 Jan 2025 12:03:21 -0400 Subject: [PATCH] Update build for improved debugability. (#184) * Update build-4.x.yml * Update tester * Update composer.json PHP 8.0 is no longer supported Require the same version as installed by the main project, similar to https://github.com/nikic/PHP-Parser/issues/1031#issuecomment-2444496231 --- .github/workflows/build-4.x.yml | 8 ++++++-- .scripts/tester | 20 ++++++++++++++++---- Homarus/composer.json | 1 + 3 files changed, 23 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-4.x.yml b/.github/workflows/build-4.x.yml index 9791f621..dfcbf1ce 100644 --- a/.github/workflows/build-4.x.yml +++ b/.github/workflows/build-4.x.yml @@ -21,7 +21,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - php-versions: ["8.0", "8.1", "8.2"] + php-versions: ["8.1", "8.2", "8.3"] name: PHP ${{ matrix.php-versions }} @@ -66,7 +66,11 @@ jobs: - name: composer install run: | cd $GITHUB_WORKSPACE/build_dir - for D in */; do (cd $D; composer install) done + for D in */; do + echo "::group::composer install under $D" + (cd $D; composer install) + echo "::endgroup" + done - name: line endings run: $SCRIPT_DIR/line_endings.sh $GITHUB_WORKSPACE diff --git a/.scripts/tester b/.scripts/tester index 512f19d9..6b20298e 100755 --- a/.scripts/tester +++ b/.scripts/tester @@ -1,13 +1,25 @@ -#!/bin/sh +#!/bin/bash export SYMFONY_DEPRECATIONS_HELPER=disabled FAIL=0 +FAILED=() for D in */; do - cd $D - echo "Operating on $D" + echo "::group::Testing $D" + cd $D composer test if [ $? -ne 0 ]; then FAIL=1 + FAILED+=($D) fi - cd .. + cd .. + echo "::endgroup" done + +echo "::group::Summary" +if [ ${#FAILED[@]} -gt 0 ] ; then + echo "Failed tests: ${FAILED[@]}" +else + echo "All tests passed!" +fi +echo "::endgroup" + exit $FAIL diff --git a/Homarus/composer.json b/Homarus/composer.json index b7d42870..ce3b9c93 100644 --- a/Homarus/composer.json +++ b/Homarus/composer.json @@ -64,6 +64,7 @@ ], "test": [ "@check", + "@putenv SYMFONY_PHPUNIT_REQUIRE=\"nikic/php-parser:^4.13\"", "bin/phpunit" ] },