Skip to content

Commit

Permalink
Added TravixCI, eslint, phpcs.
Browse files Browse the repository at this point in the history
  • Loading branch information
Joe Cartonia committed Nov 1, 2018
1 parent dceda19 commit 3946c7c
Show file tree
Hide file tree
Showing 4 changed files with 1,577 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules/
34 changes: 34 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
language: php

notifications:
email:
on_success: never
on_failure: change

php:
- 5.6

env:
- WP_VERSION=latest WP_MULTISITE=0

before_script:
- yarn install
- bash bin/install-wp-tests.sh wordpress_test root '' localhost $WP_VERSION

script:
- find . -name composer -prune -o -name node_modules -prune -o -name '*.php' -exec php -lf {} \; >/dev/null
- yarn run php-codesniffer
- yarn run js-lint

deploy:
- provider: script
script: chmod +x ./node_modules/@boldgrid/wordpress-tag-sync/release.sh && ./node_modules/@boldgrid/wordpress-tag-sync/release.sh
skip_cleanup: true
on:
tags: true
- provider: releases
api_key: "${GITHUB_TOKEN}"
file: "shrinkwrap_images.zip"
skip_cleanup: true
on:
tags: true
18 changes: 18 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"scripts": {
"js-lint": "prettier-eslint **/*.js --list-different",
"js-lint-fix": "prettier-eslint **/*.js --write",
"install-codesniffs": "php node_modules/PHP_CodeSniffer/bin/phpcs --config-set installed_paths node_modules/WordPress-Coding-Standards/",
"php-codesniffer": "npm run install-codesniffs && node_modules/PHP_CodeSniffer/bin/phpcs -p -s --report=emacs --report-width=220 --standard=WordPress-Docs --standard=WordPress-Extra --ignore=*/node_modules/* --extensions=php --exclude=WordPress.Files.FileName ."
},
"devDependencies": {
"@boldgrid/wordpress-tag-sync": "^1.3.0",
"PHP_CodeSniffer": "https://github.com/squizlabs/PHP_CodeSniffer/",
"WordPress-Coding-Standards": "https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards.git#master",
"eslint": "^4.19.1",
"eslint-config-wordpress": "^2.0.0",
"eslint-plugin-html": "^4.0.2",
"prettier-eslint": "^8.8.1",
"prettier-eslint-cli": "^4.7.1"
}
}
Loading

0 comments on commit 3946c7c

Please sign in to comment.