Skip to content

Commit

Permalink
try new composer folder for tests (#1)
Browse files Browse the repository at this point in the history
* testing bad phpcs with new /tests/ folder for composer
* finalize new composer setup
* version bump and fix meta data
* moving test ruleset into .tests folder
  • Loading branch information
scarstens authored Apr 12, 2019
1 parent fc75ea3 commit d71d1e6
Show file tree
Hide file tree
Showing 8 changed files with 47 additions and 30 deletions.
18 changes: 12 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,18 @@ jobs:
working_directory: ~/repo
steps:
- checkout
- run: sudo chmod 777 -R ~
- run: echo $PWD
- run: ls -lart
- run: env COMPOSER=composer-test.json composer install --prefer-source --no-interaction
- run: sudo ./bin/phpcs --config-set installed_paths vendor/wp-coding-standards/wpcs/
- run: env COMPOSER=composer-test.json composer test
- run:
name: Fix checkout permissions
command: sudo chmod 777 -R ~
- run :
name: Run PHPCS Tests
command: |
cd .tests
echo $PWD
ls -lart
composer install --prefer-source --no-interaction
./bin/phpcs --config-set installed_paths vendor/wp-coding-standards/wpcs/
composer test
notify:
docker:
- image: circleci/node:latest
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
# dirs
/bin/
*/bin/

# circle ci
/lib/*/.circleci

# composer
composer.phar
/vendor/
*/vendor/
/lib/autoload.php
!/lib/composer/
!/lib/composer/installed.json
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,7 @@
<rule ref="WordPress">
<exclude name="WordPress.WhiteSpace.PrecisionAlignment.Found" />
</rule>
<rule ref="WordPress.Files.FileName.InvalidClassFileName">
<exclude-pattern>/lib/*</exclude-pattern>
</rule>
</ruleset>
13 changes: 13 additions & 0 deletions .tests/composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"config": {
"bin-dir": "bin",
"vendor-dir": "vendor"
},
"require-dev": {
"wp-coding-standards/wpcs": "^1"
},
"scripts": {
"test": "./bin/phpcs -s --standard=codesniffer.ruleset.xml --extensions='php,css' ../",
"fix": "./bin/phpcbf --standard=codesniffer.ruleset.xml --extensions='php,css' ../"
}
}
File renamed without changes.
13 changes: 0 additions & 13 deletions composer-test.json

This file was deleted.

18 changes: 12 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "sm-dashboard-pages-navigator-tree",
"description": "TODO",
"description": "Dashboard Pages Navigator Tree plus extras!",
"type": "wordpress-plugin",
"keywords": [
"wordpress",
"site-options",
Expand All @@ -12,15 +13,20 @@
"authors": [
{
"name": "WordPress Phoenix",
"email": "[email protected]",
"homepage": "https://github.com/WordPress-Phoenix/sm-dashboard-pages-navigator-tree",
"role": "Developer"
}
"homepage": "https://github.com/WordPress-Phoenix",
"role": "Group"
},
{
"name": "Seth Carstens",
"email": "[email protected]",
"homepage": "https://github.com/scarstens",
"role": "Developer"
}
],
"require": {
"WordPress-Phoenix/abstract-plugin-base": "^2.6"
},
"config": {
"vendor-dir": "lib"
}
}
}
10 changes: 5 additions & 5 deletions sm-dashboard-pages-navigator-tree.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,21 @@
* @subpackage Sm_dashboard_pages_navigator_tree
* @author Seth Carstens - WordPress Phoenix
* @license GNU GPL v2.0+
* @link TODO
* @link https://github.com/WordPress-Phoenix/sm-dashboard-pages-navigator-tree
*
* Built with WP PHX WordPress Development Toolkit v3.1.0 on Friday 1st of March 2019 06:36:00 PM
* @link https://github.com/WordPress-Phoenix/wordpress-development-toolkit
*
* Plugin Name: SM Dashboard Pages Navigator Tree
* Plugin URI: TODO
* Description: TODO
* Version: 2.0.0
* Plugin URI: https://github.com/WordPress-Phoenix/sm-dashboard-pages-navigator-tree
* Description: Dashboard widget with Pages Navigator and a FrontEnd shortcode to build html sitemaps.
* Version: 2.1.0
* Author: Seth Carstens - WordPress Phoenix
* Text Domain: sm-dashboard-pages-navigator-tree
* License: GNU GPL v2.0+
*/

defined( 'ABSPATH' ) or die(); // WordPress must exist.
defined( 'ABSPATH' ) || die(); // WordPress must exist.

$current_dir = trailingslashit( dirname( __FILE__ ) );

Expand Down

0 comments on commit d71d1e6

Please sign in to comment.