Skip to content

Commit eb62aa3

Browse files
committed
update workflow
1 parent 98d65d6 commit eb62aa3

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

.github/workflows/samples-php8.yaml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,13 @@ jobs:
4141
run: composer install
4242
- name: phpunit
4343
working-directory: ${{ matrix.sample }}
44-
run: vendor/bin/phpunit
44+
run: |
45+
if [ -f phpunit.xml ] || [ -f phpunit.xml.dist ]; then
46+
vendor/bin/phpunit -c "$( [ -f phpunit.xml ] && echo phpunit.xml || echo phpunit.xml.dist )"
47+
elif [ -d tests ]; then
48+
vendor/bin/phpunit tests
49+
elif [ -d test ]; then
50+
vendor/bin/phpunit test
51+
else
52+
echo "No PHPUnit config or tests directory in ${{ matrix.sample }}; skipping."
53+
fi

0 commit comments

Comments
 (0)