Skip to content

Commit

Permalink
Merge pull request #17 from wp-cli/move-to-v2-framework
Browse files Browse the repository at this point in the history
Move command over to v2 framework
  • Loading branch information
schlessera authored Nov 9, 2018
2 parents 384f6d3 + 96dbd91 commit e8e2582
Show file tree
Hide file tree
Showing 17 changed files with 73 additions and 3,000 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ node_modules/
vendor/
*.zip
*.tar.gz
composer.lock
*.log
57 changes: 34 additions & 23 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ sudo: false
dist: trusty

language: php
php: 7.2

notifications:
email:
Expand All @@ -14,30 +15,13 @@ branches:

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

env:
global:
- PATH="$TRAVIS_BUILD_DIR/vendor/bin:$PATH"
- WP_CLI_BIN_DIR="$TRAVIS_BUILD_DIR/vendor/bin"

matrix:
include:
- php: 7.1
env: WP_VERSION=latest
- php: 7.0
env: WP_VERSION=latest
- php: 5.6
env: WP_VERSION=latest
- php: 5.6
env: WP_VERSION=3.7.11
- php: 5.6
env: WP_VERSION=trunk
- php: 5.3
dist: precise
env: WP_VERSION=latest

before_install:
- |
# Remove Xdebug for a huge performance increase:
Expand All @@ -49,14 +33,41 @@ before_install:
- |
# Raise PHP memory limit to 2048MB
echo 'memory_limit = 2048M' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
- composer validate

install:
- composer require wp-cli/wp-cli:dev-master
- composer install
- bash bin/install-package-tests.sh

before_script:
- composer validate
- composer prepare-tests

script:
- bash bin/test.sh
- composer phpunit
- composer behat || composer behat-rerun

jobs:
include:
- stage: sniff
script:
- composer lint
- composer phpcs
env: BUILD=sniff
- stage: test
php: 7.2
env: WP_VERSION=latest
- stage: test
php: 7.1
env: WP_VERSION=latest
- stage: test
php: 7.0
env: WP_VERSION=latest
- stage: test
php: 5.6
env: WP_VERSION=latest
- stage: test
php: 5.6
env: WP_VERSION=3.7.11
- stage: test
php: 5.6
env: WP_VERSION=trunk
- stage: test
php: 5.4
env: WP_VERSION=latest
File renamed without changes.
10 changes: 0 additions & 10 deletions bin/install-package-tests.sh

This file was deleted.

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

This file was deleted.

47 changes: 36 additions & 11 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,52 @@
{
"name": "wp-cli/admin-command",
"description": "Open /wp-admin/ in a browser.",
"type": "wp-cli-package",
"description": "Open /wp-admin/ in a browser.",
"homepage": "https://github.com/wp-cli/admin-command",
"license": "MIT",
"authors": [],
"minimum-stability": "dev",
"prefer-stable": true,
"autoload": {
"files": [ "command.php" ]
},
"require": {
"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": [
"admin"
]
},
"autoload": {
"psr-4": {
"": "src/"
},
"files": [
"admin-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"
]
},
"support": {
"issues": "https://github.com/wp-cli/admin-command/issues"
}
}
}
Loading

0 comments on commit e8e2582

Please sign in to comment.