forked from surveywp/kk-star-ratings
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
96 lines (86 loc) · 1.95 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
sudo: false
dist: trusty
language: php
notifications:
email:
on_success: never
on_failure: change
branches:
only:
- master
- /^[0-9]+\.[0-9]+\.[0-9]+$/
cache:
directories:
- $HOME/.composer/cache
matrix:
include:
- php: 5.5
env: WP_VERSION=4.5 CS_CHECK=phpcs COVERAGE=codacy
- php: 5.6
env: WP_VERSION=latest
- php: 7.0
env: WP_VERSION=latest
- php: 7.1
env: WP_VERSION=latest
- php: 7.2
env: WP_VERSION=latest
before_script:
- export PATH="$HOME/.composer/vendor/bin:$PATH"
- |
if [ -f ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini ]; then
phpenv config-rm xdebug.ini
else
echo "xdebug.ini does not exist"
fi
- composer install --ignore-platform-reqs
- |
if [[ ! -z "$WP_VERSION" ]] ; then
composer install-test-suite
fi
script:
- |
if [[ ! -z "$WP_VERSION" ]] ; then
composer test
WP_MULTISITE=1 composer test
fi
- |
if [[ "$CS_CHECK" == "phpcs" ]] ; then
composer check
fi
after_success:
- |
if [[ "$COVERAGE" == "codacy" && "$CODACY_PROJECT_TOKEN" != "" ]]; then
composer require codacy/coverage
composer coverage-clover
php vendor/bin/codacycoverage clover coverage.xml
fi
before_deploy:
- npm install
- npm run i18n
- php bin/readme
- mkdir deploy
- cp readme.txt deploy
- cp LICENSE.txt deploy
- cp index.php deploy
- cp freemius.php deploy
- cp -rf src/ deploy/
- cp -rf views/ deploy/
- cp -rf public/ deploy/
- cp -rf languages/ deploy/
- cp -rf freemius/ deploy/
- cd $TRAVIS_BUILD_DIR
deploy:
- provider: wordpress-plugin
skip_cleanup: true
edge:
source: TypistTech/dpl
branch: add-wordpress-plugin-deployment
on:
php: 7.2
tags: true
repo: kamalkhan/kk-star-ratings
slug: kk-star-ratings
username: bhittani
password: $WORDPRESS_ORG_PASSWORD
build_dir: deploy
assets_dir: assets