Skip to content

Commit

Permalink
Merge 3c524b2 into 3c7210f
Browse files Browse the repository at this point in the history
  • Loading branch information
derekherman committed Dec 16, 2019
2 parents 3c7210f + 3c524b2 commit 372f5b3
Show file tree
Hide file tree
Showing 16 changed files with 528 additions and 136 deletions.
15 changes: 8 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
dist: xenial

language:
- php
- node_js
language: php

php:
- "7.3"

services:
- docker

install:
- npm install
- docker-compose up -d && sleep 10

script:
- npm run lint
- npm run test:php:coverage
- npm run docker -- npm run test:php:coverage

after_success:
- npm run coverage
- npm run docker -- npm run coverage:merge:php
- docker-compose run -e COVERALLS_REPO_TOKEN=$COVERALLS_REPO_TOKEN --workdir=/var/www/html/wp-content/plugins/unsplash-wp wordpress -- composer coverage

notifications:
email: false
Expand Down
32 changes: 26 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,20 @@
"minimum-stability": "dev",
"prefer-stable": true,
"require": {
"composer/installers": "^1.7"
"composer/installers": "^1.7",
"php": ">=5.6"
},
"require-dev": {
"10up/wp_mock": "0.4.2",
"dealerdirect/phpcodesniffer-composer-installer": "0.5.0",
"mockery/mockery": "1.3.0",
"php": ">=7.2.5",
"php-coveralls/php-coveralls": "2.2.0",
"phpcompatibility/phpcompatibility-wp": "2.1.0",
"phpunit/phpunit": "8.5.0",
"wp-coding-standards/wpcs": "2.2.0"
"phpunit/phpcov": "5.0.0",
"phpunit/phpunit": "7.5.18",
"slowprog/composer-copy-file": "0.3.1",
"wp-coding-standards/wpcs": "2.2.0",
"xwp/wordpress-tests-installer": "1.0.0"
},
"autoload": {
"psr-4": {
Expand All @@ -25,25 +28,42 @@
},
"autoload-dev": {
"psr-4": {
"XWP\\Unsplash\\": "tests/php/"
"XWP\\Unsplash\\": [
"tests/phpunit/unit/",
"tests/phpunit/integration/"
]
}
},
"scripts": {
"lint": [
"@composer validate --strict",
"phpcs ."
"phpcs . -v"
],
"test": [
"phpunit"
],
"coverage": [
"php-coveralls --verbose"
],
"coverage-merge": [
"phpcov merge tests/reports/php --clover tests/reports/clover.xml"
],
"build": [
"composer install --no-dev --prefer-dist --optimize-autoloader --no-scripts"
],
"post-install-cmd": [
"SlowProg\\CopyFile\\ScriptHandler::copy"
],
"post-update-cmd": [
"SlowProg\\CopyFile\\ScriptHandler::copy"
]
},
"config": {
"sort-packages": true
},
"extra": {
"copy-file-dev": {
"tests/phpunit/wp-tests-config.php": "vendor/xwp/wordpress-tests/phpunit/wp-tests-config.php"
}
}
}
Loading

0 comments on commit 372f5b3

Please sign in to comment.