Skip to content

Commit 01876d5

Browse files
ndg63276Mark Williams
andauthored
Fix unit tests (#1015)
Co-authored-by: Mark Williams <[email protected]>
1 parent 0842e69 commit 01876d5

File tree

1 file changed

+7
-11
lines changed

1 file changed

+7
-11
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ defaults:
1919
shell: bash
2020
working-directory: ./api
2121

22-
# 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
2322
jobs:
2423
php-build:
2524
name: Checkout, build, test and lint PHP code
@@ -33,6 +32,9 @@ jobs:
3332
with:
3433
php-version: 7.3
3534
tools: psalm:4
35+
# Added extensions and coverage here so they are ready for the native run
36+
extensions: mysqli, zip, xdebug
37+
coverage: xdebug
3638

3739
- name: Validate composer.json and composer.lock
3840
run: composer validate
@@ -49,17 +51,12 @@ jobs:
4951
- name: Install dependencies
5052
run: composer install --prefer-dist --no-progress
5153

54+
# CHANGED: Replaced php-actions/phpunit with native execution
55+
# This runs the PHPUnit located in your vendor folder, avoiding the PHAR crash
5256
- name: PHPUnit Tests
53-
uses: php-actions/phpunit@v3
57+
run: vendor/bin/phpunit --configuration tests/phpunit.xml --coverage-text
5458
env:
5559
XDEBUG_MODE: coverage
56-
with:
57-
bootstrap: api/vendor/autoload.php
58-
configuration: api/tests/phpunit.xml
59-
php_extensions: xdebug mysqli zip
60-
args: --coverage-text
61-
php_version: 7.3
62-
version: 9
6360

6461
- name: Run Psalm
6562
run: psalm --output-format=github
@@ -77,8 +74,7 @@ jobs:
7774
node-version: 18.x
7875
- name: JavaScript build, lint and test
7976
working-directory: ./client
80-
# hack the output from the linting steps to avoid these stopping the builds - we are not going to get
81-
# to a clean output without considerable effort, but it's useful to see the output
77+
# hack the output from the linting steps to avoid these stopping the builds
8278
run: |
8379
cp src/js/config_sample.json src/js/config.json
8480
node --version

0 commit comments

Comments
 (0)