-
Notifications
You must be signed in to change notification settings - Fork 111
/
.travis.yml
93 lines (86 loc) · 3.83 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
dist: xenial
language: php
os: linux
php:
- 7.2
branches:
only:
- develop
- pre-release-travis-test
- pre-release
# - codeception
before_install:
- rm -rf ~/.gnupg
- sudo apt-get install xvfb
addons:
browserstack:
username: rtcamp3
access_key:
secure: UZ/nVtvmVlZJfNH1MXXy7/JKx+wnNO5OFoXMF4B54/W9B1Hca4LcShBHIudRNyY1w4n6nEvKBUU9Bo6QLNRo+GQt/Qvb4Jm/unOPMha4sqMTfqUHd0ZM+4a/7Q0LErBijjc2Bn5EN8XgYS/BbM7w/8/ffqvDAlW1Io7GMHEbgF0=
before_script:
- export PLUGIN_DIR=$(pwd)
- sudo rm -rf /etc/mysql/
- sudo rm -rf /var/lib/mysql/
- sudo apt-get -qq purge mysql* graphviz*
- sudo apt-get --purge remove mysql-server
- sudo apt-get --purge remove mysql-client
- sudo apt-get --purge remove mysql-common
- sudo apt-get autoremove
- sudo apt-get autoclean
- sudo bash -c 'echo -e "[user]\n\tname = abc\n\temail = [email protected]" > /home/travis/.gitconfig'
- wget -qO wo wops.cc && sudo bash wo
- sudo wo stack install --nginx
- sudo wo stack install --web
- sudo rm /etc/nginx/conf.d/stub_status.conf /etc/nginx/sites-enabled/22222
- sudo wo stack restart --nginx
- sudo wp --yes --allow-root cli update --nightly
- sudo wo site create automation.rtmedia.me --wp --user=ADMINUSER [email protected] --pass=ADMINPASS
- sudo sed -i '/^127.0.0.1/ s/$/ automation.rtmedia.me/' /etc/hosts
- sudo chown -R $USER:www-data /var/www/automation.rtmedia.me
- sudo chmod -R g+s /var/www/automation.rtmedia.me
- sudo chmod -R o-rwx /var/www/automation.rtmedia.me
- cd /var/www/automation.rtmedia.me/htdocs/wp-content/plugins/ && mkdir rtMedia
- cd $PLUGIN_DIR
- cp -Rf * /var/www/automation.rtmedia.me/htdocs/wp-content/plugins/rtMedia/
- cd /var/www/automation.rtmedia.me/htdocs/
- curl -I http://automation.rtmedia.me
- wp --allow-root plugin install https://downloads.wordpress.org/plugin/buddypress.6.3.0.zip
- wp plugin activate --all
- wp theme activate twentynineteen
- cd $PLUGIN_DIR
- cd tests/codeception/tests/_data
- git clone --depth=1 https://github.com/rtCamp/rtmedia-test-data.git test-data
- cd /tmp
- wget http://www.browserstack.com/browserstack-local/BrowserStackLocal-linux-x64.zip
- unzip BrowserStackLocal-linux-x64.zip
- nohup ./BrowserStackLocal --key $BROWSERSTACK_ACCESS_KEY &
- cd $PLUGIN_DIR/tests/codeception/
# - composer update
- composer install
- export PATH="$PATH:/home/travis/build/rtCamp/rtMedia/tests/codeception/vendor/bin"
## PHP_CodeSniffer
- git clone https://github.com/squizlabs/PHP_CodeSniffer.git
- cd PHP_CodeSniffer
- pear install package.xml
- cd ../
- git clone git://github.com/wimg/PHPCompatibility.git $(pear config-get php_dir)/PHP/CodeSniffer/Standards/PHPCompatibility
- git clone git://github.com/PHPCSStandards/PHPCSUtils.git $(pear config-get php_dir)/PHP/CodeSniffer/Standards/PHPCSUtils
- phpenv rehash
- phpcs -i
- phpenv rehash
- phpcs --config-set installed_paths $(pear config-get php_dir)/PHP/CodeSniffer/Standards
- phpcs --config-set installed_paths $(pear config-get php_dir)/PHP/CodeSniffer/Standards/PHPCompatibility,$(pear config-get php_dir)/PHP/CodeSniffer/Standards/PHPCSUtils
- phpcs --config-show installed_paths
- phpcs -i
- phpcs --config-set error_severity 0
- phpcs --config-set warning_severity 0
script:
## PHP_CodeSniffer
- phpcs --standard=PHPCompatibility --runtime-set testVersion 5.3-5.5 $(find ./tests/acceptance -name '*.php')
- if find . -name "*.php" ! -path "./node_modules/*" ! -path "./vendor/*" -exec php -l {} 2>&1 \; | grep "syntax error, unexpected"; then exit 1; fi
- codecept run acceptance --steps
after_script:
#- sudo cat /var/log/ee/ee.log
#notifications:
# slack:
# secure: E9tbxOZ/n4Gcwi8SiCKQ5QVw+5AfwdTq4e/VG4epQF74IqXmJJvaJgQSVKLSVXJm4O1u8JHd+ffN1Xheh1FDaKkscuJYQcT4D+oOc40bHhb0tS71v1fAMzMX7NuyqgEu2a8dbYo7bqVKtdj/EBbOPWnwgfMuA6ylTItVf294spA=