Skip to content

Commit

Permalink
Merge pull request #151 from wojsmol/tov2
Browse files Browse the repository at this point in the history
Move command over to new v2 structure
  • Loading branch information
schlessera authored Sep 25, 2018
2 parents ac6c1c2 + b3b64a1 commit dadade7
Show file tree
Hide file tree
Showing 21 changed files with 336 additions and 2,116 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ node_modules/
vendor/
*.zip
*.tar.gz
*.log
58 changes: 44 additions & 14 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
sudo: false
dist: trusty

language: php
php: 7.2

notifications:
email:
Expand All @@ -13,28 +15,56 @@ branches:

cache:
directories:
- vendor
- $HOME/.composer/cache

env:
global:
- WP_CLI_BIN_DIR=/tmp/wp-cli-phar
- PATH="$TRAVIS_BUILD_DIR/vendor/bin:$PATH"
- WP_CLI_BIN_DIR="$TRAVIS_BUILD_DIR/vendor/bin"

matrix:
before_install:
- |
# Remove Xdebug for a huge performance increase:
if [ -f ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini ]; then
phpenv config-rm xdebug.ini
else
echo "xdebug.ini does not exist"
fi
- |
# Raise PHP memory limit to 2048MB
echo 'memory_limit = 2048M' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
- composer validate

install:
- composer install
- composer prepare-tests

script:
- composer phpunit
- composer behat || composer behat-rerun

jobs:
include:
- php: 7.1
- stage: sniff
script:
- composer lint
- composer phpcs
env: BUILD=sniff
- stage: test
php: 7.2
env: WP_VERSION=latest
- php: 7.0
- stage: test
php: 7.1
env: WP_VERSION=latest
- php: 5.6
- stage: test
php: 7.0
env: WP_VERSION=latest
- php: 5.6
- stage: test
php: 5.6
env: WP_VERSION=latest
- stage: test
php: 5.6
env: WP_VERSION=trunk
- php: 5.4
- stage: test
php: 5.4
env: WP_VERSION=latest

before_script:
- composer validate
- bash bin/install-package-tests.sh

script: ./bin/test.sh
40 changes: 0 additions & 40 deletions bin/install-package-tests.sh

This file was deleted.

8 changes: 0 additions & 8 deletions bin/test.sh

This file was deleted.

38 changes: 29 additions & 9 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,24 @@
{
"name": "wp-cli/profile-command",
"description": "Quickly identify what's slow with WordPress.",
"type": "wp-cli-package",
"description": "Quickly identify what's slow with WordPress.",
"homepage": "https://runcommand.io/wp/profile/",
"license": "MIT",
"authors": [],
"minimum-stability": "dev",
"prefer-stable": true,
"autoload": {
"files": [ "command.php" ]
},
"require": {
"php": ">=5.4",
"wp-cli/wp-cli": "*"
"wp-cli/wp-cli": "^2"
},
"require-dev": {
"behat/behat": "~2.5"
"wp-cli/wp-cli-tests": "^2.0.7"
},
"config": {
"process-timeout": 7200,
"sort-packages": true
},
"extra": {
"branch-alias": {
"dev-master": "1.x-dev"
"dev-master": "2.x-dev"
},
"commands": [
"profile stage",
Expand All @@ -38,5 +37,26 @@
"post": "bin/readme/overview-body.md"
}
}
},
"autoload": {
"files": [
"command.php"
]
},
"minimum-stability": "dev",
"prefer-stable": true,
"scripts": {
"behat": "run-behat-tests",
"behat-rerun": "rerun-behat-tests",
"lint": "run-linter-tests",
"phpcs": "run-phpcs-tests",
"phpunit": "run-php-unit-tests",
"prepare-tests": "install-package-tests",
"test": [
"@lint",
"@phpcs",
"@phpunit",
"@behat"
]
}
}
Loading

0 comments on commit dadade7

Please sign in to comment.