forked from Codeinwp/zerif-lite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
54 lines (50 loc) · 1.65 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
language: php
## PHP versions to test against
php:
- "7.1"
- "7.0"
- "5.6"
- "5.5"
- "5.4"
- "5.3"
matrix:
include:
- php: "7.0"
before_install: chmod +x bin/wraith.sh
install: true
before_script:
env: TEST_SUITE=Wraith_Visual_Regression_Testing WRAITH_FAIL=5
script: ./bin/wraith.sh
sudo: false
env:
- WP_VERSION=master WP_MULTISITE=0
install:
- . $HOME/.nvm/nvm.sh
- nvm install stable
- nvm use stable
- npm install
- npm install grunt-cli -g
before_script:
## Install the wordpress latest version
- export WP_DEVELOP_DIR=/tmp/wordpress/
- mkdir -p $WP_DEVELOP_DIR
- git clone --depth=1 --branch="$WP_VERSION" git://develop.git.wordpress.org/ $WP_DEVELOP_DIR
- theme_slug=$(basename $(pwd))
- theme_dir=$WP_DEVELOP_DIR/src/wp-content/themes/$theme_slug
- cd ..
- mv $theme_slug $theme_dir
- cd $WP_DEVELOP_DIR
- cp wp-tests-config-sample.php wp-tests-config.php
- sed -i "s/youremptytestdbnamehere/wordpress_test/" wp-tests-config.php
- sed -i "s/yourusernamehere/root/" wp-tests-config.php
- sed -i "s/yourpasswordhere//" wp-tests-config.php
- mysql -e 'CREATE DATABASE wordpress_test;' -uroot
## install PHPCS and Wordpress standards
- pear install pear/PHP_CodeSniffer-2.9.0
- mkdir wordpress-coding-standards && curl -L https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/archive/master.tar.gz | tar xz --strip-components=1 -C wordpress-coding-standards
- phpenv rehash
- phpcs --config-set installed_paths $WP_DEVELOP_DIR/wordpress-coding-standards
- phpenv rehash
- cd $theme_dir
script:
grunt travis