-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
48 lines (39 loc) · 1.47 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
#
# Travis CI configuration file
#
# Use Travis CI's Docker infrastructure.
sudo: false
# Tell Travis CI that this is a PHP project.
language: php
# Versions of PHP to test against.
php:
- 5.4
- 5.5
- 5.6
- 7.0
# Specify what version of WordPress to test with.
# WP_VERSION: Any valid git branch or tag from github.com/WordPress/WordPress
env:
- WP_VERSION=4.1-branch
- WP_VERSION=master
# Install WordPress and test support files.
install:
# Where to install WordPress.
- export WP_CORE_DIR=/tmp/wordpress
# Grab specified version of WordPress from github
- wget -nv -O /tmp/wordpress.tar.gz https://github.com/WordPress/WordPress/tarball/$WP_VERSION
- mkdir -p $WP_CORE_DIR
- tar --strip-components=1 -zxmf /tmp/wordpress.tar.gz -C $WP_CORE_DIR
# Put various components in proper folders
- build_dir=$(basename $(pwd))
- plugin_dir=$WP_CORE_DIR/wp-content/plugins/drupal-password-encryption
- cd ..
- mv $build_dir $plugin_dir
# Install and configure the test suite boilerplate.
- cd $WP_CORE_DIR
- git clone --depth=1 https://github.com/BevanR/Test-suite-boilerplate-for-WordPress-websites.git test
- mv $plugin_dir/.travis/wp-tests-config.local.php test/phpunit/
# The boilerplate repository's default phpunit.xml is already configured for drupal-password-encryption plugin.
- mv test/phpunit/phpunit-sample.xml phpunit.xml
# Init the database.
- mysql -e 'CREATE DATABASE wordpress_test;' -uroot