This repository has been archived by the owner on Nov 4, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
executable file
·51 lines (47 loc) · 1.61 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
language: php
php:
- 5.3
- 5.4
env:
global:
- PLUGINSLUG=wow-recruit-widget
- MAINFILE=wow-recruit-widget.php
matrix:
- WP_VERSION=latest WP_MULTISITE=0
- WP_VERSION=latest WP_MULTISITE=1
- WP_VERSION=3.7 WP_MULTISITE=0
- WP_VERSION=3.7 WP_MULTISITE=1
before_script:
- curl -O https://raw.githubusercontent.com/ycfreeman/wp-plugin-template/master/deploy-wordpress-plugin.sh
- curl -O https://raw.githubusercontent.com/wp-cli/wp-cli/master/templates/install-wp-tests.sh
- curl -Lo travis_after_all.py https://raw.github.com/Javierchik/travis_after_all/master/travis_after_all.py
- bash install-wp-tests.sh wordpress_test root '' localhost $WP_VERSION
script:
- phpunit
after_success:
- python travis_after_all.py
- export $(cat .to_export_back)
- |
if [ "$BUILD_LEADER" = "YES" ]; then
if [ "$BUILD_AGGREGATE_STATUS" = "others_succeeded" ]; then
if ([ -n "$TRAVIS_TAG" ] && [ "$TRAVIS_PULL_REQUEST" = "false" ]); then
echo tag=$TRAVIS_TAG;
bash deploy-wordpress-plugin.sh $PLUGINSLUG $MAINFILE $TRAVIS_TAG $SVNUSER $SVNPASS;
fi
else
echo "Some jobs failed"
fi
fi
after_failure:
- python travis_after_all.py
- export $(cat .to_export_back)
- |
if [ "$BUILD_LEADER" = "YES" ]; then
if [ "$BUILD_AGGREGATE_STATUS" = "others_failed" ]; then
echo "All jobs failed"
else
echo "Some jobs failed"
fi
fi
after_script:
- echo leader=$BUILD_LEADER status=$BUILD_AGGREGATE_STATUS