Skip to content

Commit

Permalink
Test Github action for tests (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
SPie authored Mar 7, 2023
1 parent 48d0417 commit d74ece3
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 20 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: CI

on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
tests:
runs-on: 'ubuntu-latest'
strategy:
matrix:
php-version: ['7.4', '8.0', '8.1', '8.2']
name: Test for PHP Version ${{ matrix.php-version }}
steps:
- uses: actions/checkout@v3

- uses: php-actions/composer@v6
with:
php_version: ${{ matrix.php-version }}

- uses: php-actions/phpunit@master
with:
bootstrap: vendor/autoload.php
configuration: phpunit.xml
php_version: ${{ matrix.php-version }}
version: 9

32 changes: 12 additions & 20 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,23 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
backupStaticAttributes="false"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
beStrictAboutTestsThatDoNotTestAnything="false">
<testsuites>
<testsuite name="Unit">
<directory suffix="Test.php">./tests/Unit</directory>
</testsuite>
</testsuites>
<filter>
<whitelist processUncoveredFilesFromWhitelist="true">
<directory suffix=".php">./src</directory>
</whitelist>
</filter>
<php>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" backupGlobals="false" backupStaticAttributes="false" colors="true" convertErrorsToExceptions="true" convertNoticesToExceptions="true" convertWarningsToExceptions="true" processIsolation="false" stopOnFailure="false" beStrictAboutTestsThatDoNotTestAnything="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
<coverage processUncoveredFiles="true">
<include>
<directory suffix=".php">./src</directory>
</include>
</coverage>
<testsuites>
<testsuite name="Unit">
<directory suffix="Test.php">./tests/Unit</directory>
</testsuite>
</testsuites>
<php>
</php>
</phpunit>

0 comments on commit d74ece3

Please sign in to comment.