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

Adapt package for framework v2 #20

Merged
merged 6 commits into from Aug 4, 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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
59 changes: 35 additions & 24 deletions .travis.yml
Expand Up @@ -2,6 +2,7 @@ sudo: false
dist: trusty

language: php
php: 7.2

notifications:
email:
Expand All @@ -21,24 +22,6 @@ env:
- PATH="$TRAVIS_BUILD_DIR/vendor/bin:$PATH"
- WP_CLI_BIN_DIR="$TRAVIS_BUILD_DIR/vendor/bin"

matrix:
include:
- php: 7.2
env: WP_VERSION=latest
- 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 @@ -50,14 +33,42 @@ 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

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
dist: precise
env: WP_VERSION=latest
11 changes: 0 additions & 11 deletions bin/install-package-tests.sh

This file was deleted.

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

This file was deleted.

55 changes: 37 additions & 18 deletions composer.json
@@ -1,11 +1,8 @@
{
"name": "wp-cli/rewrite-command",
"description": "Lists or flushes the site's rewrite rules, updates the permalink structure.",
"type": "wp-cli-package",
"description": "Lists or flushes the site's rewrite rules, updates the permalink structure.",
"homepage": "https://github.com/wp-cli/rewrite-command",
"support": {
"issues": "https://github.com/wp-cli/rewrite-command/issues"
},
"license": "MIT",
"authors": [
{
Expand All @@ -14,31 +11,53 @@
"homepage": "https://runcommand.io"
}
],
"minimum-stability": "dev",
"prefer-stable": true,
"autoload": {
"psr-4": {
"": "src/"
},
"files": [
"rewrite-command.php"
]
"require": {
"wp-cli/wp-cli": "^2"
},
"require": {},
"require-dev": {
"behat/behat": "~2.5",
"wp-cli/wp-cli": "*"
"wp-cli/entity-command": "^1.3",
"wp-cli/wp-cli-tests": "^0"
},
"config": {
"sort-packages": true,
"process-timeout": 7200
},
"extra": {
"branch-alias": {
"dev-master": "1.x-dev"
},
"bundled": true,
"commands": [
"rewrite",
"rewrite flush",
"rewrite list",
"rewrite structure"
],
"bundled": true
]
},
"autoload": {
"psr-4": {
"": "src/"
},
"files": [
"rewrite-command.php"
]
},
"minimum-stability": "dev",
"prefer-stable": true,
"scripts": {
"behat": "run-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/rewrite-command/issues"
}
}