From 21962012c635999e00b3d83e3fde4f3db71037db Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Mon, 14 Apr 2025 09:57:00 -0700 Subject: [PATCH 1/4] No functional testing on 8.4 --- .github/workflows/tests.yml | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index fa93a38..47c28c6 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -226,10 +226,14 @@ jobs: env: DB: ${{steps.database-type.outputs.db}} COVERAGE: ${{ matrix.COVERAGE != 1 && '0' || '1' }} + PHP_VERSION: ${{ matrix.php }} run: | - if [ $COVERAGE == '1' ] + if [ $COVERAGE = '1' ] + then + phpBB/vendor/bin/phpunit --configuration phpBB/ext/$EXTNAME/.github/phpunit-$DB-github.xml --bootstrap ./tests/bootstrap.php --coverage-clover build/logs/clover.xml --testsuite 'phpBB Test Suite' + elif [ "$PHP_VERSION" = "8.4" ] then - phpBB/vendor/bin/phpunit --configuration phpBB/ext/$EXTNAME/.github/phpunit-$DB-github.xml --bootstrap ./tests/bootstrap.php --coverage-clover build/logs/clover.xml + phpBB/vendor/bin/phpunit --configuration phpBB/ext/$EXTNAME/.github/phpunit-$DB-github.xml --bootstrap ./tests/bootstrap.php --testsuite 'phpBB Test Suite' else phpBB/vendor/bin/phpunit --configuration phpBB/ext/$EXTNAME/.github/phpunit-$DB-github.xml --bootstrap ./tests/bootstrap.php fi @@ -348,7 +352,14 @@ jobs: - name: Run unit tests env: DB: ${{steps.database-type.outputs.db}} - run: phpBB/vendor/bin/phpunit --configuration phpBB/ext/$EXTNAME/.github/phpunit-$DB-github.xml --bootstrap ./tests/bootstrap.php + PHP_VERSION: ${{ matrix.php }} + run: | + if [ "$PHP_VERSION" = "8.4" ] + then + phpBB/vendor/bin/phpunit --configuration phpBB/ext/$EXTNAME/.github/phpunit-$DB-github.xml --bootstrap ./tests/bootstrap.php --testsuite 'phpBB Test Suite' + else + phpBB/vendor/bin/phpunit --configuration phpBB/ext/$EXTNAME/.github/phpunit-$DB-github.xml --bootstrap ./tests/bootstrap.php + fi working-directory: ./phpBB3 # END PostgreSQL Job From 4b33405fce24969149a591ecd4c099cd0da85514 Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Mon, 14 Apr 2025 10:31:59 -0700 Subject: [PATCH 2/4] Fix coverage phpunit xml config --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 47c28c6..2485bf3 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -216,7 +216,7 @@ jobs: run: | if [ $COVERAGE == '1' ] then - sed -n '1h;1!H;${;g;s/<\/php>/<\/php>\n\t\n\t\t\n\t\t\t..\/<\/directory>\n\t\t\t\n\t\t\t\t..\/tests\/<\/directory>\n\t\t\t\t..\/language\/<\/directory>\n\t\t\t\t..\/migrations\/<\/directory>\n\t\t\t<\/exclude>\n\t\t<\/whitelist>\n\t<\/filter>/g;p;}' .github/phpunit-$DB-github.xml &> phpBB/ext/$EXTNAME/.github/phpunit-$DB-github.xml + sed -n '1h;1!H;${;g;s/<\/php>/<\/php>\n\t\n\t\t\n\t\t\t..\/<\/directory>\n\t\t<\/include>\n\t\t\n\t\t\t..\/tests\/<\/directory>\n\t\t\t..\/language\/<\/directory>\n\t\t\t..\/migrations\/<\/directory>\n\t\t<\/exclude>\n\t<\/coverage>/g;p;}' .github/phpunit-$DB-github.xml &> phpBB/ext/$EXTNAME/.github/phpunit-$DB-github.xml else mkdir -p phpBB/ext/$EXTNAME/.github && cp .github/phpunit* $_ fi From 4274f3048e198b1dc1f3243578ac8a780d75224d Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Tue, 15 Apr 2025 08:08:16 -0700 Subject: [PATCH 3/4] test against pr --- .github/workflows/tests.yml | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 2485bf3..4572d51 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -6,7 +6,7 @@ env: IMAGE_ICC: 1 # Run icc profile sniffer on your images? 1 or 0 EPV: 0 # Run EPV (Extension Pre Validator) on your code? 1 or 0 EXECUTABLE_FILES: 1 # Run check for executable files? 1 or 0 - PHPBB_BRANCH: master # The phpBB branch to run tests on + PHPBB_BRANCH: ticket/17496 # The phpBB branch to run tests on on: push: @@ -37,7 +37,7 @@ jobs: - name: Checkout phpBB uses: actions/checkout@v4 with: - repository: phpbb/phpbb + repository: rxu/phpbb3 ref: ${{ env.PHPBB_BRANCH }} path: phpBB3 @@ -162,7 +162,7 @@ jobs: - name: Checkout phpBB uses: actions/checkout@v4 with: - repository: phpbb/phpbb + repository: rxu/phpbb3 ref: ${{ env.PHPBB_BRANCH }} path: phpBB3 @@ -231,9 +231,6 @@ jobs: if [ $COVERAGE = '1' ] then phpBB/vendor/bin/phpunit --configuration phpBB/ext/$EXTNAME/.github/phpunit-$DB-github.xml --bootstrap ./tests/bootstrap.php --coverage-clover build/logs/clover.xml --testsuite 'phpBB Test Suite' - elif [ "$PHP_VERSION" = "8.4" ] - then - phpBB/vendor/bin/phpunit --configuration phpBB/ext/$EXTNAME/.github/phpunit-$DB-github.xml --bootstrap ./tests/bootstrap.php --testsuite 'phpBB Test Suite' else phpBB/vendor/bin/phpunit --configuration phpBB/ext/$EXTNAME/.github/phpunit-$DB-github.xml --bootstrap ./tests/bootstrap.php fi @@ -307,7 +304,7 @@ jobs: - name: Checkout phpBB uses: actions/checkout@v4 with: - repository: phpbb/phpbb + repository: rxu/phpbb3 ref: ${{ env.PHPBB_BRANCH }} path: phpBB3 @@ -354,12 +351,7 @@ jobs: DB: ${{steps.database-type.outputs.db}} PHP_VERSION: ${{ matrix.php }} run: | - if [ "$PHP_VERSION" = "8.4" ] - then - phpBB/vendor/bin/phpunit --configuration phpBB/ext/$EXTNAME/.github/phpunit-$DB-github.xml --bootstrap ./tests/bootstrap.php --testsuite 'phpBB Test Suite' - else phpBB/vendor/bin/phpunit --configuration phpBB/ext/$EXTNAME/.github/phpunit-$DB-github.xml --bootstrap ./tests/bootstrap.php - fi working-directory: ./phpBB3 # END PostgreSQL Job @@ -412,7 +404,7 @@ jobs: - name: Checkout phpBB uses: actions/checkout@v4 with: - repository: phpbb/phpbb + repository: rxu/phpbb3 ref: ${{ env.PHPBB_BRANCH }} path: phpBB3 From 46c44508654acd6e941e3a524f6b9dc6776dff20 Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Fri, 25 Apr 2025 09:41:54 -0700 Subject: [PATCH 4/4] Fix tests --- .github/workflows/tests.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 4572d51..6a02022 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -363,9 +363,6 @@ jobs: include: - php: '8.1' db: "sqlite3" - - php: '8.1' - db: "mcr.microsoft.com/mssql/server:2017-latest" - db_alias: 'MSSQL 2017' - php: '8.1' db: "mcr.microsoft.com/mssql/server:2019-CU27-ubuntu-20.04" db_alias: 'MSSQL 2019' @@ -377,7 +374,7 @@ jobs: services: mssql: - image: ${{ matrix.db != 'mcr.microsoft.com/mssql/server:2017-latest' && matrix.db != 'mcr.microsoft.com/mssql/server:2019-CU27-ubuntu-20.04' && matrix.db != 'mcr.microsoft.com/mssql/server:2022-CU13-ubuntu-22.04' && 'mcr.microsoft.com/mssql/server:2017-latest' || matrix.db }} + image: ${{ matrix.db != 'mcr.microsoft.com/mssql/server:2019-CU27-ubuntu-20.04' && matrix.db != 'mcr.microsoft.com/mssql/server:2022-CU13-ubuntu-22.04' && 'mcr.microsoft.com/mssql/server:2022-CU13-ubuntu-22.04' || matrix.db }} env: SA_PASSWORD: "Pssw0rd_12" ACCEPT_EULA: "y" @@ -417,7 +414,7 @@ jobs: env: MATRIX_DB: ${{ matrix.db }} run: | - if [ $MATRIX_DB == 'mcr.microsoft.com/mssql/server:2017-latest' ] || [ $MATRIX_DB == 'mcr.microsoft.com/mssql/server:2019-CU27-ubuntu-20.04' ] || [ $MATRIX_DB == 'mcr.microsoft.com/mssql/server:2022-CU13-ubuntu-22.04' ] + if [ $MATRIX_DB == 'mcr.microsoft.com/mssql/server:2019-CU27-ubuntu-20.04' ] || [ $MATRIX_DB == 'mcr.microsoft.com/mssql/server:2022-CU13-ubuntu-22.04' ] then db='mssql' else