forked from themeum/kirki
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
63 lines (55 loc) · 2.26 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
language: php
sudo: false
notifications:
on_success: never
on_failure: change
php:
- 7.0
- 5.6
before_install:
- pip install --user codecov
before_script:
- bash tests/bin/install-wp-tests.sh wordpress_test root '' localhost latest
- curl -s http://getcomposer.org/installer | php
- php composer.phar install --dev --no-interaction
- composer install --dev
# After CodeSniffer install you should refresh your path.
- phpenv rehash
# Install JSCS: JavaScript Code Style checker.
# @link http://jscs.info/
- npm install -g jscs
# Install JSHint, a JavaScript Code Quality Tool.
# @link http://jshint.com/docs/
- npm install -g jshint
script:
- mkdir -p build/logs
# - phpunit # --coverage-clover=coverage.clover
# Search for PHP syntax errors.
# - find . \( -name '*kirki*.php' \) -exec php -lf {} \;
# - ./vendor/bin/phpunit --coverage-clover ./tests/logs/clover.xml
# Run the plugin through JSHint.
- jshint ./controls/js/src/*.js
- jshint ./modules/**/*.js
# Run the plugin through JavaScript Code Style checker.
- jscs ./controls/js/src/*.js
# WordPress Coding Standards.
# @link https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards
# @link http://pear.php.net/package/PHP_CodeSniffer/
# -p flag: Show progress of the run.
# -s flag: Show sniff codes in all reports.
# -v flag: Print verbose output.
# -n flag: Do not print warnings. (shortcut for --warning-severity=0)
# --standard: Use WordPress as the standard.
# --extensions: Only sniff PHP files.
- vendor/bin/phpcs -p -s -v -n ./*.php --standard=./phpcs.ruleset.xml --extensions=php
- vendor/bin/phpcs -p -s -v -n ./**/*.php --standard=./phpcs.ruleset.xml --extensions=php --ignore=./vendor/*.php,./tests/*.php
- vendor/bin/phpcs -p -s -v -n ./**/**/*.php --standard=./phpcs.ruleset.xml --extensions=php --ignore=./modules/webfonts/webfonts.php,./vendor/**/*.php
- vendor/bin/phpcs -p -s -v -n ./**/**/**/*.php --standard=./phpcs.ruleset.xml --extensions=php --ignore=./vendor/**/**/*.php
after_script:
# - php vendor/bin/coveralls
- wget https://scrutinizer-ci.com/ocular.phar
# - php ocular.phar code-coverage:upload --format=php-clover coverage.clove
after_success:
# - coveralls
# - codecov
# - bash <(curl -s https://codecov.io/bash)