forked from themeum/kirki
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
59 lines (51 loc) · 2.02 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
language: php
sudo: false
notifications:
on_success: never
on_failure: change
php:
- 7.0
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 ESLint.
- npm install -g eslint
- npm install -g eslint-config-wordpress
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 ./build/logs/clover.xml
# Run the plugin through ESLint.
- eslint ./controls/js/src/*.js
- eslint ./modules/**/*.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
- 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
after_script:
- php vendor/bin/coveralls
- wget https://scrutinizer-ci.com/ocular.phar
- php ocular.phar code-coverage:upload --format=php-clover coverage.clove
- php vendor/bin/codacycoverage clover ./build/logs/clover.xml
after_success:
- travis_retry php vendor/bin/php-coveralls
- coveralls
- codecov
- bash <(curl -s https://codecov.io/bash)