diff --git a/.forgejo/workflows/php-test.yml b/.forgejo/workflows/php-test.yml index c42658a..6a929cd 100644 --- a/.forgejo/workflows/php-test.yml +++ b/.forgejo/workflows/php-test.yml @@ -48,12 +48,23 @@ jobs: - name: Run Pint if: inputs.pint - run: vendor/bin/pint --test + run: | + if [ -f vendor/bin/pint ]; then + vendor/bin/pint --test + else + echo "Pint not installed, skipping" + fi - name: Run tests run: | - FLAGS="--ci" - if [ "${{ inputs.coverage }}" = "true" ]; then - FLAGS="$FLAGS --coverage" + if [ -f vendor/bin/pest ]; then + FLAGS="--ci" + if [ "${{ inputs.coverage }}" = "true" ]; then + FLAGS="$FLAGS --coverage" + fi + vendor/bin/pest $FLAGS + elif [ -f vendor/bin/phpunit ]; then + vendor/bin/phpunit + else + echo "No test runner found (pest or phpunit), skipping tests" fi - vendor/bin/pest $FLAGS