-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #22 from heiglandreas/add-github-workflow
Adds github workflow to run automated tests
- Loading branch information
Showing
6 changed files
with
95 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
tab_width = 4 | ||
trim_trailing_whitespace = true | ||
indent_size = tab | ||
indent_style = tab | ||
insert_final_newline = true | ||
end_of_line = lf | ||
|
||
[{*.yml,*.yml.dist}] | ||
indent_style = space | ||
indent_size = 2 | ||
tab_width = 2 | ||
|
||
[*.xml] | ||
tab_width = 2 | ||
|
||
[*.json] | ||
tab_width = 2 | ||
|
||
[COMMIT_EDITMSG] | ||
max_line_length = 72 | ||
|
||
[*.md] | ||
max_line_length = 80 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: CI | ||
on: [push, pull_request] | ||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
php-versions: [ '7.4', '8.0', '8.1', '8.2', '8.3', '8.4' ] | ||
name: Test on ${{ matrix.php-versions }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: install Ghostscript | ||
run: sudo apt-get install -y ghostscript | ||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-versions }} | ||
- name: install dependencies | ||
run: composer install | ||
- name: install tools | ||
run: composer require --dev phpunit/phpunit | ||
- name: Run Unit-Tests | ||
run: ./vendor/bin/phpunit --testdox --coverage-text | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
/vendor/ | ||
composer.lock | ||
.phpunit.result.cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,27 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<phpunit bootstrap="./vendor/autoload.php"> | ||
<testsuite name="Org_Heigl\Ghostscript Test-Suite"> | ||
<directory>./tests</directory> | ||
</testsuite> | ||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.6/phpunit.xsd" | ||
bootstrap="vendor/autoload.php" | ||
cacheResultFile=".phpunit.cache/test-results" | ||
executionOrder="depends,defects" | ||
forceCoversAnnotation="false" | ||
beStrictAboutCoversAnnotation="false" | ||
beStrictAboutOutputDuringTests="true" | ||
beStrictAboutTodoAnnotatedTests="true" | ||
convertDeprecationsToExceptions="true" | ||
failOnRisky="true" | ||
failOnWarning="true" | ||
verbose="true"> | ||
<testsuites> | ||
<testsuite name="default"> | ||
<directory>tests</directory> | ||
</testsuite> | ||
</testsuites> | ||
|
||
<groups> | ||
<exclude> | ||
<group>disable</group> | ||
</exclude> | ||
</groups> | ||
|
||
<filter> | ||
<whitelist> | ||
<directory suffix=".php">src</directory> | ||
</whitelist> | ||
</filter> | ||
|
||
<logging> | ||
<!-- | ||
Adapt these paths to your special needs | ||
--> | ||
<log type="coverage-html" target="build/phpunit/coverage" charset="UTF-8" | ||
yui="true" highlight="false" | ||
lowUpperBound="35" highLowerBound="70"/> | ||
</logging> | ||
<coverage cacheDirectory=".phpunit.cache/code-coverage" | ||
processUncoveredFiles="true"> | ||
<include> | ||
<directory suffix=".php">src</directory> | ||
</include> | ||
</coverage> | ||
</phpunit> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters