From 7c05df1aa821d183eeff746c5eaa550d343ac577 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Sat, 9 Sep 2023 08:52:13 +0200 Subject: [PATCH] [ticket/17176] Run functional and unit tests separately PHPBB3-17176 --- .github/workflows/tests.yml | 67 +++++++++++++++---------------------- 1 file changed, 27 insertions(+), 40 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index f778693be1..5fa23963d6 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -100,45 +100,31 @@ jobs: runs-on: ubuntu-latest strategy: matrix: + type: ['unit', 'functional'] + php: ['8.1', '8.2', '8.3'] + db: [ + 'mariadb:10.2', + 'mariadb:10.3', + 'mariadb:10.4', + 'mariadb:10.6', + 'mariadb:10.9', + 'mariadb:10.10', + 'mariadb:10.11', + # 'mariadb:11.0' # currently disabled + 'mysql:5.7', + 'mysql:8.0', + 'mysql:8.1' + ] include: - - php: '8.1' - db: "mariadb:10.2" - - php: '8.1' - db: "mariadb:10.3" - - php: '8.1' - db: "mariadb:10.4" - - php: '8.1' - db: "mariadb:10.6" - - php: '8.1' - db: "mariadb:10.9" - - php: '8.1' - db: "mariadb:10.10" - - php: '8.1' - db: "mariadb:10.11" - # - php: '8.1' # currently disabled - # db: "mariadb:11.0" - php: '8.1' db: "mysql:5.7" db_alias: "MySQL Slow Tests" + type: 'unit' SLOWTESTS: 1 - php: '8.1' db: "mysql:5.7" db_alias: "MyISAM Tests" MYISAM: 1 - - php: '8.1' - db: "mysql:5.7" - - php: '8.1' - db: "mysql:8.0" - - php: '8.1' - db: "mysql:8.1" - - php: '8.2' - db: "mysql:5.7" - - php: '8.2' - db: "mysql:8.0" - - php: '8.2' - db: "mysql:8.1" - - php: '8.3' - db: "mysql:8.0" name: PHP ${{ matrix.php }} - ${{ matrix.db_alias != '' && matrix.db_alias || matrix.db }} @@ -230,9 +216,16 @@ jobs: - name: Run unit tests env: DB: ${{steps.database-type.outputs.db}} - if: ${{ matrix.SLOWTESTS != 1 && matrix.NOTESTS != 1 }} + if: ${{ matrix.SLOWTESTS != 1 && matrix.NOTESTS != 1 && matrix.type == 'unit' }} run: | - phpBB/vendor/bin/phpunit --configuration .github/phpunit-$DB-github.xml --verbose --stop-on-error + phpBB/vendor/bin/phpunit --configuration .github/phpunit-$DB-github.xml --verbose --stop-on-error --exclude-group functional + + - name: Run functional tests + env: + DB: ${{steps.database-type.outputs.db}} + if: ${{ matrix.SLOWTESTS != 1 && matrix.NOTESTS != 1 && matrix.type == 'functional' }} + run: | + phpBB/vendor/bin/phpunit --configuration .github/phpunit-$DB-github.xml --verbose --stop-on-error --group functional - name: Slow tests env: @@ -467,14 +460,8 @@ jobs: strategy: matrix: type: ['unit', 'functional'] - include: - - php: '8.1' - db: "postgres" - - php: '8.2' - db: "postgres" - #- php: '8.3' - # db: "postgres" - # type: 'unit' + php: ['8.1', '8.2'] + db: ['postgres'] name: Windows - PHP ${{ matrix.php }} - ${{ matrix.db }} - ${{ matrix.type }}