-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
79 additions
and
40 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,54 @@ | ||
version: 2.1 | ||
|
||
jobs: | ||
unittest: | ||
parameters: | ||
php-version: | ||
type: string | ||
plugin-name: | ||
type: string | ||
default: "dotenv" | ||
docker: | ||
- image: hillliu/pmvc-phpunit:<< parameters.php-version >> | ||
working_directory: /var/www/<< parameters.plugin-name >> | ||
steps: | ||
- checkout | ||
- run: | ||
name: "Display information" | ||
command: | | ||
date | ||
php -v | ||
php -m | ||
composer --version | ||
phpunit --version | ||
- run: | ||
name: Composer install packages | ||
command: | | ||
composer update | ||
composer install --prefer-source | ||
- run: | ||
name: PHPUnit | ||
command: | | ||
ENABLE_COVERAGE=false | ||
if [ "<< parameters.php-version >>" == "8.2" ]; then | ||
if [ "$ENABLE_COVERAGE" == "true" ]; then | ||
XDEBUG_MODE=coverage phpunit --coverage-clover clover.xml | ||
coveralls --coverage_clover=clover.xml -v -o coveralls-upload.json | ||
else | ||
phpunit --display-deprecations | ||
fi | ||
else | ||
phpunit | ||
fi | ||
- store_artifacts: | ||
path: /var/www/<< parameters.plugin-name >>/clover.xml | ||
- store_artifacts: | ||
path: /var/www/<< parameters.plugin-name >>/coveralls-upload.json | ||
|
||
workflows: | ||
run-job: | ||
jobs: | ||
- unittest: | ||
matrix: | ||
parameters: | ||
php-version: ["8.2", "8.1", "8.0", "5.6"] |
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 |
---|---|---|
|
@@ -2,4 +2,5 @@ vendor | |
composer.lock | ||
.php_cs.cache | ||
.phpunit.result.cache | ||
.phpunit.cache | ||
.*.sw? |
This file was deleted.
Oops, something went wrong.
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,24 +1,24 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<phpunit backupGlobals="false" | ||
backupStaticAttributes="false" | ||
colors="true" | ||
bootstrap="tests/include.php" | ||
convertErrorsToExceptions="true" | ||
convertNoticesToExceptions="true" | ||
convertWarningsToExceptions="true" | ||
processIsolation="false" | ||
stopOnFailure="false" | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<phpunit | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.0/phpunit.xsd" | ||
backupGlobals="false" | ||
colors="true" | ||
bootstrap="tests/include.php" | ||
processIsolation="false" | ||
stopOnFailure="false" | ||
cacheDirectory=".phpunit.cache" | ||
backupStaticProperties="false" | ||
> | ||
<testsuites> | ||
<testsuite name="Application Test Suite"> | ||
<directory>./tests/</directory> | ||
<file>./tests/test.php</file> | ||
</testsuite> | ||
</testsuites> | ||
<php> | ||
<ini name="error_reporting" value="E_ALL"/> | ||
<ini name="display_errors" value="true"/> | ||
<ini name="display_startup_errors" value="true"/> | ||
<env name="APP_ENV" value="testing"/> | ||
</php> | ||
<testsuites> | ||
<testsuite name="Application Test Suite"> | ||
<directory>./tests/</directory> | ||
</testsuite> | ||
</testsuites> | ||
<php> | ||
<ini name="error_reporting" value="E_ALL" /> | ||
<ini name="display_errors" value="true" /> | ||
<ini name="display_startup_errors" value="true" /> | ||
<env name="APP_ENV" value="testing" /> | ||
</php> | ||
</phpunit> |
File renamed without changes.