From 2297676764747323456bfc276bcfa627cc8df1c9 Mon Sep 17 00:00:00 2001 From: Mark Williams Date: Fri, 5 Dec 2025 15:20:59 +0000 Subject: [PATCH] Fix unit tests --- .github/workflows/ci.yml | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 050cec929..2b5c73a84 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,7 +19,6 @@ defaults: shell: bash working-directory: ./api -# Note, jobs do not share the same working environment, whereas steps do. Also, jobs will run in parallel unless the 'needs' tag is used to flag a dependency jobs: php-build: name: Checkout, build, test and lint PHP code @@ -33,6 +32,9 @@ jobs: with: php-version: 7.3 tools: psalm:4 + # Added extensions and coverage here so they are ready for the native run + extensions: mysqli, zip, xdebug + coverage: xdebug - name: Validate composer.json and composer.lock run: composer validate @@ -49,17 +51,12 @@ jobs: - name: Install dependencies run: composer install --prefer-dist --no-progress + # CHANGED: Replaced php-actions/phpunit with native execution + # This runs the PHPUnit located in your vendor folder, avoiding the PHAR crash - name: PHPUnit Tests - uses: php-actions/phpunit@v3 + run: vendor/bin/phpunit --configuration tests/phpunit.xml --coverage-text env: XDEBUG_MODE: coverage - with: - bootstrap: api/vendor/autoload.php - configuration: api/tests/phpunit.xml - php_extensions: xdebug mysqli zip - args: --coverage-text - php_version: 7.3 - version: 9 - name: Run Psalm run: psalm --output-format=github @@ -77,8 +74,7 @@ jobs: node-version: 18.x - name: JavaScript build, lint and test working-directory: ./client - # hack the output from the linting steps to avoid these stopping the builds - we are not going to get - # to a clean output without considerable effort, but it's useful to see the output + # hack the output from the linting steps to avoid these stopping the builds run: | cp src/js/config_sample.json src/js/config.json node --version