Skip to content

Commit

Permalink
Migrate to Box3
Browse files Browse the repository at this point in the history
  • Loading branch information
theofidry committed May 5, 2019
1 parent 34094d8 commit 2c1d40a
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .gitignore
@@ -1,6 +1,5 @@
parallelunit.sublime-workspace
parallelunit.sublime-project
:
chromedriver.log
vendor
composer.lock
Expand All @@ -11,3 +10,4 @@ nbproject
.php_cs
.php_cs.cache
.phpunit.result.cache
bin/paratest.phar
3 changes: 2 additions & 1 deletion .travis.yml
Expand Up @@ -31,6 +31,7 @@ install:
- if [[ $CS_CHECK == 'true' ]]; then phpenv config-rm xdebug.ini || return 0; else composer remove --dev --no-update --no-scripts friendsofphp/php-cs-fixer; fi;
- if [[ $PHPUNIT_DEV == 'true' ]]; then composer require --no-update phpunit/phpunit=*@dev; fi;
- if [[ $DEPS == 'lowest' ]]; then COMPOSER_ARGS='--prefer-lowest --prefer-stable'; fi; composer update --no-interaction --prefer-dist $COMPOSER_ARGS
- if [[ $BUILD_PHAR == 'true' ]]; then wget https://github.com/humbug/box/releases/download/3.7.0/box.phar fi;

script:
- if [[ $CS_CHECK == 'true' ]]; then vendor/bin/php-cs-fixer fix --diff --dry-run --verbose; fi;
Expand All @@ -40,7 +41,7 @@ after_script:
- if [[ $CODE_COVERAGE == 'true' ]]; then wget https://scrutinizer-ci.com/ocular.phar; php ocular.phar code-coverage:upload --format=php-clover coverage.clover; fi;

before_deploy:
- if [[ $BUILD_PHAR == 'true' ]]; then mkdir -p build; (cd build; curl -LSs https://box-project.github.io/box2/installer.php | php; php -d phar.readonly=0 box.phar build -c ../box.json.dist;); fi;
- if [[ $BUILD_PHAR == 'true' ]]; then php box.phar compile fi;

deploy:
provider: releases
Expand Down
6 changes: 6 additions & 0 deletions bin/paratest
Expand Up @@ -25,6 +25,12 @@ if (!$found) {
);
}

if (false === in_array(PHP_SAPI, ['cli', 'phpdbg', 'embed'], true)) {
echo PHP_EOL . 'ParaTest may only be invoked from a command line, got "' . PHP_SAPI . '"' . PHP_EOL;

exit(1);
}

#use ParaTest\UI\Text\PHPUnitTextUI;

#PHPUnitTextUI::main();
Expand Down
11 changes: 3 additions & 8 deletions box.json.dist
@@ -1,9 +1,7 @@
{
"alias": "paratest.phar",
"chmod": "0755",
"compactors": [
"Herrera\\Box\\Compactor\\Json",
"Herrera\\Box\\Compactor\\Php"
"KevinGH\\Box\\Compactor\\Json",
"KevinGH\\Box\\Compactor\\Php"
],
"directories": [
"src"
Expand All @@ -20,8 +18,5 @@
"files": [
"LICENSE"
],
"git-version": "git-version",
"main": "bin/paratest",
"output": "paratest-@git-version@.phar",
"stub": true
"git-version": "git-version"
}

0 comments on commit 2c1d40a

Please sign in to comment.