Skip to content
This repository has been archived by the owner on Nov 10, 2022. It is now read-only.

Commit

Permalink
Merge pull request #278 from xwp/feature/composer-first
Browse files Browse the repository at this point in the history
Recommend Composer or NPM instead of Git submodules
  • Loading branch information
westonruter committed Jan 17, 2019
2 parents 38dbb83 + e426600 commit 90574b4
Show file tree
Hide file tree
Showing 45 changed files with 315 additions and 148 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
codecept.phar
/vendor
/package-lock.json
20 changes: 16 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,26 @@
#
# Important: This file is for the wp-dev-lib Travis CI runs.
# IMPORTANT: This file is for the wp-dev-lib Travis CI runs.
# See sample-config/.travis.yml for a sample config for a WordPress project.
#

language: php

php:
- '7.2'

addons:
apt:
packages:
- libxml2-utils # For xmllint.

notifications:
email: false

script:
- find . -name "*.php" -print0 | xargs -0 -n1 -P8 php -l # Ensure valid PHP syntax
- shellcheck *.sh || true # Run shellcheck but ignore the output
- shellcheck --format json *.sh | grep --quiet --invert-match '"level":"error"' # Fail only if shellcheck finds errors.
- composer test # Run linters for the wp-dev-lib files.
- composer install --working-dir="tests/composer" # Test Composer integration setup.
- composer test --working-dir="tests/composer" # Test Composer integration pre-commit hook.
- cd tests/composer && export DEV_LIB_PATH=vendor/xwp/wp-dev-lib/scripts # We need Bash shell which might not be available in Composer scripts.
- source "$DEV_LIB_PATH/travis.install.sh"
- source "$DEV_LIB_PATH/travis.script.sh"
- source "$DEV_LIB_PATH/travis.after_script.sh"
7 changes: 7 additions & 0 deletions assets/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 7 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,11 @@
"issues": "https://github.com/xwp/wp-dev-lib/issues",
"source": "https://github.com/xwp/wp-dev-lib"
},
"require": {}
"scripts": {
"test": [
"find ./scripts -name *.php -print0 | xargs -0 -n1 -P8 php -l",
"shellcheck **/*.sh || true",
"shellcheck --format json **/*.sh | grep --quiet --invert-match '\"level\":\"error\"'"
]
}
}
Loading

0 comments on commit 90574b4

Please sign in to comment.