forked from starverte/flint
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
48 lines (47 loc) · 1.25 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
language: php
php:
- '7'
- '5.6'
env:
- WP_VERSION=master
- WP_VERSION=4.5
- WP_VERSION=4.4
matrix:
allow_failures:
- env: WP_VERSION=4.4
- env: WP_VERSION=4.5
fast_finish: true
install:
- npm install
- composer install
- grunt init
cache:
directories:
- node_modules
- vendor
before_script:
- mkdir -p /tmp/wordpress
- git clone --depth=1 --branch="$WP_VERSION" git://develop.git.wordpress.org/ /tmp/wordpress/
- theme_slug=$(basename $(pwd))
- theme_dir=/tmp/wordpress/src/wp-content/themes/$theme_slug
- cd ..
- mv $theme_slug $theme_dir
- cd /tmp/wordpress
- echo /tmp/wordpress
- 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
- cd $theme_dir
- phpenv rehash
script:
- npm test
notifications:
email: false
slack:
secure: mS0AtQDBMEP2FaA67SxNkLetpcdnyJNKfW9OFT8Zn6Q+fW7k26+e2lYbzPLRugNjU/4ERskQVvfMmlOFzxP3mMZNQVGpSiloYwRwMdjw8duxCDa32mu//q2rP6nKoBR/tWu9SiX0YD39BmBBaXf8XA/mQp0oQXEPYtK7U8p2sFs=
sudo: false
addons:
code_climate:
repo_token: ddb48cd255e12e3bc1325b5b70d0e8ada05cbc41ea22b64359fe2ce0b3e9d76f