diff --git a/.github/phpunit-mariadb-github.xml b/.github/phpunit-mariadb-github.xml new file mode 100644 index 0000000..ceb6091 --- /dev/null +++ b/.github/phpunit-mariadb-github.xml @@ -0,0 +1,46 @@ + + + + + ../tests + ../tests/functional + ../tests/lint_test.php + + + ../tests/functional + + + + + slow + + + + + ../ + + + ../tests/ + ../language/ + ../migrations/ + + + + + + + + + + + + + diff --git a/.github/phpunit-mysql-github.xml b/.github/phpunit-mysql-github.xml new file mode 100644 index 0000000..d5a04a6 --- /dev/null +++ b/.github/phpunit-mysql-github.xml @@ -0,0 +1,48 @@ + + + + + ../tests + ../tests/functional + ../tests/lint_test.php + + + ../tests/functional + + + + + slow + + + + + ../ + + + ../tests/ + ../language/ + ../migrations/ + + + + + + + + + + + + + + + diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index c9fe6e2..2845742 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -300,13 +300,21 @@ jobs: run: composer install working-directory: ./phpBB4/phpBB/ext/${{ env.EXTNAME }} + - name: Checkout test-framework + if: ${{ matrix.COVERAGE == '1' }} + uses: actions/checkout@v4 + with: + repository: phpbb-extensions/test-framework + ref: ${{ env.PHPBB_BRANCH }} + path: phpBB4/test-framework + - name: Setup PHPUnit files env: DB: ${{steps.database-type.outputs.db}} COVERAGE: ${{ matrix.COVERAGE == '1' && '1' || '0' }} run: | if [ "$COVERAGE" == '1' ]; then - sed '//,/<\/source>/c\\t\n\t\t\n\t\t\t../\n\t\t\n\t\t\n\t\t\t../tests/\n\t\t\t../language/\n\t\t\t../migrations/\n\t\t\n\t' ".github/phpunit-$DB-github.xml" > "phpBB/ext/$EXTNAME/.github/phpunit-$DB-github.xml" + mkdir -p "phpBB/ext/$EXTNAME/.github" && cp test-framework/.github/phpunit* "$_" else mkdir -p "phpBB/ext/$EXTNAME/.github" && cp .github/phpunit* "$_" fi