diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 62be863..411fed9 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -11,7 +11,7 @@ jobs: test: - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 continue-on-error: ${{ matrix.experimental }} strategy: @@ -45,6 +45,13 @@ jobs: database_image: "mariadb:12.3" coverage: false experimental: false + - mediawiki_version: '1.46' + smw_version: dev-master + php_version: 8.4 + database_type: mysql + database_image: "mariadb:12.3" + coverage: false + experimental: false env: MW_VERSION: ${{ matrix.mediawiki_version }} @@ -74,5 +81,9 @@ jobs: uses: codecov/codecov-action@v6 with: token: ${{ secrets.CODECOV_TOKEN }} - files: coverage/php/coverage.xml + # Coverage files are written into the Docker volume mounted at + # build/coverage/ (see build/docker-compose-ci.yml), NOT at the + # repo root. Using the correct paths ensures Codecov applies the + # codecov.yml path fixes and resolves PHP paths correctly. + files: build/coverage/php/coverage.xml if: matrix.coverage == true diff --git a/composer.json b/composer.json index 138b439..bf06bd9 100644 --- a/composer.json +++ b/composer.json @@ -63,8 +63,11 @@ "fix": [ "@phpcs-fix" ], - "phpunit": "php ${MW_INSTALL_PATH:-../..}/tests/phpunit/phpunit.php -c phpunit.xml.dist", - "phpunit-coverage": "php ${MW_INSTALL_PATH:-../..}/tests/phpunit/phpunit.php -c phpunit.xml.dist --testdox --coverage-text --coverage-html coverage/php --coverage-clover coverage/php/coverage.xml", + "phpunit": [ + "Composer\\Config::disableProcessTimeout", + "cd ${MW_INSTALL_PATH:-../..} && { [ -f tests/phpunit/generatePHPUnitConfig.php ] && { php tests/phpunit/generatePHPUnitConfig.php >/dev/null 2>&1 || true; [ -f phpunit.xml ] || printf '%s' '' > phpunit.xml; } || true; } && MEDIAWIKI_HAS_INTEGRATION_TESTS=1 vendor/bin/phpunit -c extensions/SemanticExternalQueryLookup/phpunit.xml.dist --bootstrap tests/phpunit/bootstrap.php" + ], + "phpunit-coverage": "@phpunit --testdox --coverage-text --coverage-html extensions/SemanticExternalQueryLookup/coverage/php --coverage-clover extensions/SemanticExternalQueryLookup/coverage/php/coverage.xml", "post-test-coverage": [ "sed -i 's|/var/www/html/extensions/SemanticExternalQueryLookup/||g' coverage/php/coverage.xml", "find coverage/php -type f -name '*.html' -exec sed -i 's|/var/www/html/extensions/||g' {} +"