-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
75 lines (75 loc) · 3.7 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
64
65
66
67
68
69
70
71
72
73
74
75
sudo: false
language: php
dist: trusty
matrix:
fast_finish: true
include:
- php: '5.4'
- php: '5.5'
- php: '5.6'
- php: '7.0'
- php: '7.1'
env:
- DEPLOY=1
- SNIFF=1
before_script:
- export PHPCS_DIR=/tmp/phpcs
- export SNIFFS_DIR=/tmp/sniffs
- if [[ "$SNIFF" == "1" ]]; then git clone -b 2.9 --depth 1 https://github.com/squizlabs/PHP_CodeSniffer.git
$PHPCS_DIR; fi
- if [[ "$SNIFF" == "1" ]]; then git clone -b master --depth 1 https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards.git
$SNIFFS_DIR; fi
- if [[ "$SNIFF" == "1" ]]; then git clone -b 7.1.4 --depth 1 https://github.com/wimg/PHPCompatibility.git
$SNIFFS_DIR/PHPCompatibility; fi
- if [[ "$SNIFF" == "1" ]]; then $PHPCS_DIR/scripts/phpcs --config-set installed_paths
$SNIFFS_DIR; fi
- if [[ "$SNIFF" == "1" ]]; then phpenv rehash; fi
- if [[ "$SNIFF" == "1" ]]; then npm install -g jscs; fi
- if [[ "$SNIFF" == "1" ]]; then npm install -g jshint; fi
- if [[ "$SNIFF" == "1" ]]; then wget https://develop.svn.wordpress.org/trunk/.jshintrc;
fi
- if [[ "$SNIFF" == "1" ]] || [[ "$DEPLOY" == "1" ]]; then npm install -g grunt-cli;
fi
- if [[ "$SNIFF" == "1" ]] || [[ "$DEPLOY" == "1" ]]; then npm install; fi
- if [[ "$SNIFF" == "1" ]] || [[ "$DEPLOY" == "1" ]]; then npm install -g grunt-checktextdomain;
fi
script:
- mkdir -p build/logs
- find -L . -name '*.php' -print0 | xargs -0 -n 1 -P 4 php -l
- if [[ "$SNIFF" == "1" ]]; then jshint ./layout/js/*.js; fi
- if [[ "$SNIFF" == "1" ]]; then jscs ./layout/js/*.js; fi
- if [[ "$SNIFF" == "1" ]]; then grunt textdomain; fi
- if [[ "$SNIFF" == "1" ]]; then $PHPCS_DIR/scripts/phpcs -p -s -v -n ./*.php --standard=./phpcs.ruleset.xml
--extensions=php; fi
- if [[ "$SNIFF" == "1" ]]; then $PHPCS_DIR/scripts/phpcs -p -s -v -n ./**/*.php --standard=./phpcs.ruleset.xml
--extensions=php --ignore=./inc/plugin-activation.php,./node_modules/*.php; fi
- if [[ "$SNIFF" == "1" ]]; then $PHPCS_DIR/scripts/phpcs -p -s -v -n ./**/**/*.php
--standard=./phpcs.ruleset.xml --extensions=php --ignore=./node_modules/**/*.php;
fi
- if [[ "$SNIFF" == "1" ]]; then $PHPCS_DIR/scripts/phpcs -p -s -v -n ./**/**/**/*.php
--standard=./phpcs.ruleset.xml --extensions=php --ignore=./node_modules/**/**/*.php;
fi
- if [[ "$SNIFF" == "1" ]]; then $PHPCS_DIR/scripts/phpcs -p -s -v -n ./**/**/**/**/*.php
--standard=./phpcs.ruleset.xml --extensions=php --ignore=./node_modules/**/**/**/*.php,./inc/libraries/epsilon-framework/*.php;
fi
- if [[ "$SNIFF" == "1" ]]; then $PHPCS_DIR/scripts/phpcs -p -s -v -n ./**/**/**/**/**/*.php
--standard=./phpcs.ruleset.xml --extensions=php --ignore=./node_modules/**/**/**/**/*.php,./inc/libraries/epsilon-framework/**/*.php;
fi
notifications:
email: false
cache:
directories:
- node_modules
after_success:
- if [[ "$DEPLOY" == "1" ]]; then grunt build-archive; fi
- if [[ "$DEPLOY" == "1" ]]; then sh set_tags.sh; fi
deploy:
provider: releases
skip_cleanup: true
api_key:
secure: FSgyXXwuQGFOfh3JgR1bPmzDabRAxQKObyR7bK9nP3eUIPGoGMc6mufLwqhaOjUYKh3qR9gXL7sGw5Hh0sjc9Tu7pg8g4RAKftvWn0ER8MDCjs58Yh/dpVmsZ/JQHUufTlBsqeOv+5h8dzELDaMjBiinZ/qBF02wIDvf/MpxtbFfUxPOkIGzHTt5Uc5AtVtZHoNBM0vHeDWWb3RKdIryU9eHUYNyG+rAjTots1KNsc0//57J+uHbWRA/15gm/omuB9aHeLweTtTH+vEj7RIli8Sx0EaxPXWB+pnMK2qtNec6SgET9DgXC3FJZOybfazFQaR21OZxvS5OnYBEnZdztsHWDI7EELrD6NVtkfPZ97cXBAsv1jZDeVn42k4feCfo9sBazEjati1BiWJbWCnJ8LCyVUntyl3Iy7do6KjihwnxVOJU+wvBTQR1e+wyLjLoBFKnWMNW7U4AauXwFJe0oa25/cUT2Ydzn9XYrbCsmgrG8XYocXvrxQxpAT1r8xOrTnqN04CYdZffVrw4L0NwQLvLdK6EtMywCo+UC8rBtDlPE1rD2K8qX4+P59AeRZt/4+KvtIxedlau5PrXPqTAIQo8Sdv4UxVkO535K8r9ICWoMk2WpOs8NRyBBNQBdN3ZcWi3SWlcqrFrqA4JxltUO1fMMfqcsrPzb/Y0DedgJYk=
file: illdy.zip
on:
repo: puikinsh/illdy
branch: 'master'
condition: "$DEPLOY = 1"