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

Move phpunit.xml to root folder #166

Merged
merged 3 commits into from
Nov 26, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ pipeline:
secrets: [codecov_token]
pull: true
paths:
- tests/unit/clover.xml
- tests/output/clover.xml
files:
- "*.xml"
when:
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@
# Composer
composer.phar
vendor/
vendor-bin/**/vendor
Copy link
Member

Choose a reason for hiding this comment

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

when we have vendor/ in .gitignore file, do we really need vendor-bin/**/vendor

Copy link
Contributor Author

@phil-davis phil-davis Nov 23, 2018

Choose a reason for hiding this comment

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

vendor/ will just ignore the directory vendor at the top level of the repo.
The other one is inside vendor-bin/ which is a different top-level directory.

Edit: see comments below

Copy link
Member

@paurakhsharma paurakhsharma Nov 23, 2018

Choose a reason for hiding this comment

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

@phil-davis, IMO if we add /vendor it will only ignore the top-level directory. But in this case (i.e when using vendor/) every vendor folder inside the repo is ignored.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I tested this just now. What @paurakhsharma says is true. Every folder called vendor anywhere in the tree is ignored just by writing vendor/ in .gitignore

@patrickjahns please advise what you want to do. Because we need to have a consistent format for this stuff in every repo. Otherwise it is confusing for people who wonder about small differences.

vendor-bin/**/composer.lock

# Mac OS
.DS_Store

# Tests - auto-generated files
/tests/acceptance/output*
/tests/unit/clover.xml
/tests/output/clover.xml

# Node.js modules
node_modules/
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ endif
endif

# bin file definitions
PHPUNIT=php -d zend.enable_gc=0 vendor/bin/phpunit
PHPUNITDBG=phpdbg -qrr -d memory_limit=4096M -d zend.enable_gc=0 "./vendor/bin/phpunit"
PHPUNIT=php -d zend.enable_gc=0 "$(PWD)/../../lib/composer/bin/phpunit"
PHPUNITDBG=phpdbg -qrr -d memory_limit=4096M -d zend.enable_gc=0 "$(PWD)/../../lib/composer/bin/phpunit"
PHP_CS_FIXER=php -d zend.enable_gc=0 vendor-bin/owncloud-codestyle/vendor/bin/php-cs-fixer
PHAN=php -d zend.enable_gc=0 vendor-bin/phan/vendor/bin/phan
PHPSTAN=php -d zend.enable_gc=0 vendor-bin/phpstan/vendor/bin/phpstan
Expand Down Expand Up @@ -105,12 +105,12 @@ clean: clean-deps clean-dist clean-build
.PHONY: test-php-unit
test-php-unit: ## Run php unit tests
test-php-unit: vendor/bin/phpunit
$(PHPUNIT) --configuration ./tests/unit/phpunit.xml --testsuite unit
$(PHPUNIT) --configuration ./phpunit.xml --testsuite unit

.PHONY: test-php-unit-dbg
test-php-unit-dbg: ## Run php unit tests using phpdbg
test-php-unit-dbg: vendor/bin/phpunit
$(PHPUNITDBG) --configuration ./tests/unit/phpunit.xml --testsuite unit
$(PHPUNITDBG) --configuration ./phpunit.xml --testsuite unit

.PHONY: test-php-style
test-php-style: ## Run php-cs-fixer and check owncloud code-style
Expand Down
2 changes: 0 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
"require": {
},
"require-dev": {
"phpunit/phpunit": "^5.7",
"jakub-onderka/php-parallel-lint": "^1.0",
"bamarni/composer-bin-plugin": "^1.2"
},
"extra": {
Expand Down
Loading