Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 33 additions & 3 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,32 +11,62 @@ jobs:
php-stan:
name: PHP Stan
runs-on: ubuntu-latest
strategy:
matrix:
php: [ 7.3, 7.4, 8.1, 8.2 ]
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 7.4
php-version: "${{ matrix.php }}"
tools: composer, phpstan

- name: Get composer cache directory
id: composer-cache
run: 'echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT'

- name: Cache dependencies
uses: actions/cache@v4
with:
path: "${{ steps.composer-cache.outputs.dir }}"
key: "${{ runner.os }}-php-${{ matrix.php}}-composer-${{ hashFiles('**/composer.json') }}"
restore-keys: "${{ runner.os }}-php-${{ matrix.php}}-composer-"

- name: Install dependencies
run: composer install --no-ansi --no-interaction --no-progress --no-scripts

- name: Run PHPStan
run: ./vendor/bin/phpstan
run: phpstan

php-unit:
name: PHP Unit
runs-on: ubuntu-latest
strategy:
matrix:
php: [ 7.3, 7.4, 8.1, 8.2 ]
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 7.4
php-version: "${{ matrix.php }}"
tools: composer

- name: Get composer cache directory
id: composer-cache
run: 'echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT'

- name: Cache dependencies
uses: actions/cache@v4
with:
path: "${{ steps.composer-cache.outputs.dir }}"
key: "${{ runner.os }}-php-${{ matrix.php}}-composer-${{ hashFiles('**/composer.json') }}"
restore-keys: "${{ runner.os }}-php-${{ matrix.php}}-composer-"

- name: Install dependencies
run: composer install --no-ansi --no-interaction --no-progress --no-scripts
Expand Down
28 changes: 14 additions & 14 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false">
<coverage processUncoveredFiles="true">
<include>
<directory suffix=".php">./src</directory>
</include>
<report>
<clover outputFile="clover.xml"/>
</report>
</coverage>
<testsuites>
<testsuite name="Unit">
<directory suffix="Test.php">./tests/Unit</directory>
</testsuite>
</testsuites>
<logging/>
<coverage processUncoveredFiles="true">
<include>
<directory suffix=".php">./src</directory>
</include>
<report>
<clover outputFile="clover.xml"/>
</report>
</coverage>
<testsuites>
<testsuite name="Unit">
<directory suffix="Test.php">./tests/Unit</directory>
</testsuite>
</testsuites>
<logging/>
</phpunit>