Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix composer scripts for windows #194

Merged
merged 4 commits into from
Feb 6, 2019
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
22 changes: 11 additions & 11 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,26 +50,26 @@
},
"scripts": {
"test-common": [
"vendor/bin/parallel-lint src tests",
"vendor/bin/phpmd src text phpmd.xml",
"vendor/bin/phploc src",
"vendor/bin/phpcpd src",
"vendor/bin/phpunit --debug --coverage-clover=coverage.xml",
"parallel-lint src tests",
"phpmd src text phpmd.xml",
"phploc src",
"phpcpd src",
"phpunit --debug --coverage-clover=coverage.xml",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See https://getcomposer.org/doc/articles/scripts.md#writing-custom-commands:

Note: Before executing scripts, Composer's bin-dir is temporarily pushed on top of the PATH environment variable so that binaries of dependencies are easily accessible. In this example no matter if the phpunit binary is actually in vendor/bin/phpunit or bin/phpunit it will be found and executed.

"php bin/churn run src"
],
"test-ci": [
"@test-common"
],
"test": [
"@test-common",
"vendor/bin/phpcs --standard=psr2 src -spn",
"vendor/bin/phpcs --standard=phpcs.xml src -spn",
"vendor/bin/phpcs --standard=codor.xml src -spn"
"phpcs --standard=psr2 src -spn",
"phpcs --standard=phpcs.xml src -spn",
"phpcs --standard=codor.xml src -spn"
],
"fix": [
"vendor/bin/phpcbf -n --standard=phpcs.xml src/",
"vendor/bin/phpcbf --standard=codor.xml src -spn",
"vendor/bin/phpcbf --standard=psr2 src -sp"
"phpcbf -n --standard=phpcs.xml src/",
"phpcbf --standard=codor.xml src -spn",
"phpcbf --standard=psr2 src -sp"
]
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php declare(strict_types = 1);

namespace Churn\Tests\Assessors\CyclomaticComplexity;
namespace Churn\Tests\Unit\Assessors\CyclomaticComplexity;

use Churn\Tests\BaseTestCase;
use Churn\Assessors\CyclomaticComplexity\CyclomaticComplexityAssessor;
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/Factories/ProcessFactoryTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php declare(strict_types = 1);

namespace Churn\Tests\Results;
namespace Churn\Tests\Unit\Factories;

use Churn\Configuration\Config;
use Churn\Factories\ProcessFactory;
Expand Down
4 changes: 2 additions & 2 deletions tests/Unit/Factories/ResultsRendererFactoryTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
<?php declare(strict_types = 1);

namespace Churn\Tests\Results;
namespace Churn\Tests\Unit\Factories;

use Churn\Factories\ResultsRendererFactory;
use Churn\Renderers\Results\ConsoleResultsRenderer;
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/Managers/FileManagerTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php declare(strict_types = 1);

namespace Churn\Tests\Results;
namespace Churn\Tests\Unit\Managers;

use Churn\Configuration\Config;
use Churn\Managers\FileManager;
Expand Down
4 changes: 3 additions & 1 deletion tests/Unit/Renderers/Results/CsvResultsRendererTest.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php
<?php declare(strict_types = 1);

namespace Churn\Tests\Unit\Renderers\Results;

use Churn\Renderers\Results\CsvResultsRenderer;
use Churn\Results\Result;
Expand Down
4 changes: 3 additions & 1 deletion tests/Unit/Renderers/Results/JsonResultsRendererTest.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php
<?php declare(strict_types = 1);

namespace Churn\Tests\Unit\Renderers\Results;

use Churn\Results\Result;
use Mockery as m;
Expand Down
3 changes: 1 addition & 2 deletions tests/Unit/Results/ResultsParserTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php

<?php declare(strict_types = 1);

namespace Churn\Tests\Results;

Expand Down
4 changes: 1 addition & 3 deletions tests/Unit/Values/FileTest.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
<?php

<?php declare(strict_types = 1);

namespace Churn\Tests\Unit\Values;


use Churn\Tests\BaseTestCase;
use Churn\Values\File;

Expand Down