Skip to content

Commit

Permalink
#6 Tests moved to /tests, .gitattributes added to exclude unnecessary…
Browse files Browse the repository at this point in the history
… files from export (#8)
  • Loading branch information
michalbiarda committed Mar 30, 2021
1 parent 12873a1 commit cbdd3ab
Show file tree
Hide file tree
Showing 61 changed files with 17 additions and 6 deletions.
5 changes: 5 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/tests export-ignore
.gitattributes export-ignore
.gitignore export-ignore
azure-pipelines.yml export-ignore
phpcs.ruleset.xml export-ignore
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.idea
.phpunit.result.cache
vendor
src/Test/phpunit_integration.xml
tests/phpunit_integration.xml
6 changes: 3 additions & 3 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ steps:
- script: ./vendor/bin/phpmd ./src/ ansi controversial,naming --exclude /Model/*
displayName: 'Run PHP mess detector for other rulesets'

- script: ./vendor/bin/phpunit --no-configuration --log-junit $(System.DefaultWorkingDirectory)/junit-unit-report.xml ./src/Test/Unit/
- script: ./vendor/bin/phpunit --no-configuration --log-junit $(System.DefaultWorkingDirectory)/junit-unit-report.xml ./tests/Unit/
displayName: 'Run unit tests with phpunit'

- task: PublishTestResults@2
Expand All @@ -52,9 +52,9 @@ steps:

- script: |
echo Linking $(integrationTestsConfig.secureFilePath) to the integration tests directory...
sudo ln -s -t $(System.DefaultWorkingDirectory)/src/Test $(integrationTestsConfig.secureFilePath)
sudo ln -s -t $(System.DefaultWorkingDirectory)/tests $(integrationTestsConfig.secureFilePath)
- script: ./vendor/bin/phpunit --configuration ./src/Test/phpunit_integration.xml --log-junit $(System.DefaultWorkingDirectory)/junit-integration-report.xml
- script: ./vendor/bin/phpunit --configuration ./tests/phpunit_integration.xml --log-junit $(System.DefaultWorkingDirectory)/junit-integration-report.xml
displayName: 'Run integration tests with phpunit'

- task: PublishTestResults@2
Expand Down
8 changes: 7 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "michalbiarda/shipx-php-sdk",
"version": "1.0.0-alpha6",
"description": "PHP SDK for Inpost ShipX API",
"version": "1.0.0-alpha7",
"authors": [
{
"email": "m.biarda@gmail.com",
Expand All @@ -22,6 +23,11 @@
"MB\\ShipXSDK\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"MB\\ShipXSDK\\Test\\": "tests/"
}
},
"license": "Beerware",
"require-dev": {
"phpunit/phpunit": "^9.4",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* See LICENSE.txt for license details.
*/
-->
<phpunit bootstrap="../../vendor/autoload.php">
<phpunit bootstrap="../vendor/autoload.php">
<testsuites>
<testsuite name="Integration Tests">
<directory>Integration</directory>
Expand Down

0 comments on commit cbdd3ab

Please sign in to comment.