-
Notifications
You must be signed in to change notification settings - Fork 188
/
.travis.yml
55 lines (55 loc) · 3.1 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
sudo: false
language: php
matrix:
fast_finish: true
include:
- php: '5.4'
- php: '5.5'
- php: '5.6'
- php: '7.0'
- php: '7.1'
- php: '7.2'
env: SNIFF=1
env: DEPLOY=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 master --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 ./assets/js/*.js; fi
- if [[ "$SNIFF" == "1" ]]; then jscs ./assets/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; 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; 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: VuMTincGHOH/YopkV/2CdDIR+AKbpnddz1NHdgfY2kdtVU0ZGjQ5e2hUUV6EOLhLy0kgxopPlCSgUP6OHWISQHkE/8ojOfq/NaSY8KstJR3RjhTUgNfdtCowJfOFutvOR02m47a8wJwOcTaav2Qh9e9UrX6TsnlXYNCXd3yxW8feZXckGILi4gbTouimFMkXIGvQ7TzNjX13uXCwFzpd6k8PcWfXHcmFh9q/vUzu2SdXt6ubD3J2mbi6M7CgFHJ3BP/6rGlvAah7gJsABRV531J93EoXm+WoyLrl48gWrnHPVK3WtZvicf5/I/1M4FCnjxPNL4qbWLXamaauOZQBlJTMQNftOYnUmtlIhiGVoFwunGPtaey9FemEx6w3Xt5xjKyvWX4xf3gKptYioexWKLbAi9TJekIOmH5bdhiQXAatAvUrSbiEUcLwUR6S3t6xa4aawgAQgxT0Qc6N9peQN6Wf6KnhBcNJwNKxm2TvU+yF8AwUwCC6O4scJuHvU+8NScUzbaMOkb59gu4Z99E/l5pclahdQNxI7DPpyxERWYIfj84+XIOVzJCfIxczUZMLzCdjRKhByodIyTsHRjfilMgM+wz3aAiSn95M7BVx3BAtS4gZA0pa3eOGMgZ72lKrsstBdOVn9+UU00S/vQOxnn41JxgzGlpnIKbwXeXXk5o=
file: activello.zip
on:
branch: master
repo: puikinsh/Activello
condition: "$DEPLOY = 1"