Update .gitea/workflows/php-test.yml
Some checks failed
CI Demo / build (push) Successful in 3s
Docker Test / docker-ops (push) Successful in 4s
.NET Test / dotnet-test (push) Failing after 18s
Go Test / go-test (push) Failing after 5s
Java Test / java-hello (push) Successful in 31s
Julia Test / julia-test (push) Failing after 15s
Node.js Test / nodejs-test (push) Has been cancelled
Notebook Test / nb-test (push) Has been cancelled
PHP Test / php-test (push) Has been cancelled
Python Test / python-hello (push) Has been cancelled
R Test / r-cmdcheck (push) Has been cancelled
Rust Test / rust-test (push) Has been cancelled
Scala Test / scala-test (push) Has been cancelled
Kotlin Test / kotlin-hello (push) Has been cancelled
Swift Test / swift-hello (push) Has been cancelled
Some checks failed
CI Demo / build (push) Successful in 3s
Docker Test / docker-ops (push) Successful in 4s
.NET Test / dotnet-test (push) Failing after 18s
Go Test / go-test (push) Failing after 5s
Java Test / java-hello (push) Successful in 31s
Julia Test / julia-test (push) Failing after 15s
Node.js Test / nodejs-test (push) Has been cancelled
Notebook Test / nb-test (push) Has been cancelled
PHP Test / php-test (push) Has been cancelled
Python Test / python-hello (push) Has been cancelled
R Test / r-cmdcheck (push) Has been cancelled
Rust Test / rust-test (push) Has been cancelled
Scala Test / scala-test (push) Has been cancelled
Kotlin Test / kotlin-hello (push) Has been cancelled
Swift Test / swift-hello (push) Has been cancelled
This commit is contained in:
@@ -11,8 +11,26 @@ jobs:
|
||||
- name: Set up PHP
|
||||
uses: shivammathur/setup-php@20169f80b72fbb73ec98664e85c82f0946b89868
|
||||
|
||||
- name: Install dependencies
|
||||
run: composer install --prefer-dist --no-progress --no-suggest
|
||||
- name: Verify PHP & Composer
|
||||
run: |
|
||||
php -v
|
||||
composer --version
|
||||
|
||||
- name: Run tests
|
||||
run: vendor/bin/phpunit --configuration phpunit.xml
|
||||
# If there is a composer.json, install deps; otherwise skip gracefully
|
||||
- name: Install dependencies (if composer.json exists)
|
||||
run: |
|
||||
if [ -f composer.json ]; then
|
||||
composer install --prefer-dist --no-interaction --no-progress
|
||||
else
|
||||
echo "No composer.json found; skipping composer install."
|
||||
fi
|
||||
|
||||
# If PHPUnit config exists, run tests; else just print Hello
|
||||
- name: Run tests or Hello, PHP!
|
||||
run: |
|
||||
if [ -f vendor/bin/phpunit ] || [ -f phpunit.xml ] || [ -f phpunit.xml.dist ]; then
|
||||
vendor/bin/phpunit --no-coverage || vendor/bin/phpunit --no-coverage
|
||||
else
|
||||
echo '<?php echo "Hello, PHP!\\n";' > index.php
|
||||
php index.php
|
||||
fi
|
||||
|
Reference in New Issue
Block a user