simpler phpunit tests

This commit is contained in:
Jamie Barton 2024-09-05 10:58:32 +01:00
parent cd5eedaf59
commit 0a3275127e
2 changed files with 13 additions and 24 deletions

View File

@ -12,29 +12,7 @@ permissions:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "8.3"
- name: Validate composer.json and composer.lock
run: composer validate --strict
- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v3
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Install dependencies
run: composer install --prefer-dist --no-progress
- name: Run tests
run: vendor/bin/phpunit
- uses: php-actions/composer@v6
- run: vendor/bin/phpunit

11
phpunit.xml Normal file
View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/11.0/phpunit.xsd"
bootstrap="vendor/autoload.php"
colors="true">
<testsuites>
<testsuite name="Dumbo Test Suite">
<directory>tests</directory>
</testsuite>
</testsuites>
</phpunit>