Files
ultimatemember/.travis.yml
T

111 lines
3.1 KiB
YAML
Raw Normal View History

2017-06-08 21:34:20 +08:00
# Travis CI Configuration File
2017-06-08 21:05:40 +08:00
2017-06-08 21:34:20 +08:00
# Tell Travis CI we're using PHP
2017-06-08 21:05:40 +08:00
language: php
2019-08-30 20:06:42 +08:00
dist: trusty
2017-06-08 21:34:20 +08:00
# Setup a global environment and overide as needed
env:
global:
- WP_TRAVISCI=phpunit
2017-06-08 21:05:40 +08:00
2017-06-08 21:34:20 +08:00
cache:
directories:
- $HOME/.composer/cache/files
- $HOME/.cache/yarn
2017-06-08 21:05:40 +08:00
2019-08-28 18:07:52 +08:00
# Test main supported versions of PHP against latest WP.
php:
- 5.6
- 7.0
- 7.1
- 7.2
- 7.3
env:
- WP_VERSION=latest WP_MULTISITE=0
2017-06-08 21:34:20 +08:00
# Next we define our matrix of additional build configurations to test against.
# The versions listed above will automatically create our first configuration,
# so it doesn't need to be re-defined below.
# Test WP trunk/master and two latest versions on minimum (5.2).
# Test WP latest two versions (4.5, 4.3) on most popular (5.5, 5.6).
# Test WP latest stable (4.5) on other supported PHP (5.3, 5.4).
# Test WP trunk/master on edge platforms (7.0, PHP nightly).
# WP_VERSION specifies the tag to use. The way these tests are configured to run
# requires at least WordPress 3.8. Specify "master" to test against SVN trunk.
2017-06-08 21:05:40 +08:00
matrix:
2017-06-08 21:34:20 +08:00
2019-08-28 18:07:52 +08:00
fast_finish: true
include:
- name: "Coding standard check"
php: 7.2
env: WP_VERSION=latest WP_MULTISITE=0 RUN_PHPCS=1
- name: "e2e tests"
php: 7.2
env: WP_VERSION=latest WP_MULTISITE=0 RUN_E2E=1
addons:
chrome: beta
apt:
packages:
- nginx
- name: "Unit tests code coverage"
php: 7.3
env: WP_VERSION=latest WP_MULTISITE=0 RUN_CODE_COVERAGE=1
- name: "Ultimate Member unit tests using WordPress nightly"
php: 7.3
env: WP_VERSION=nightly WP_MULTISITE=0
- php: 7.4snapshot
env: WP_VERSION=nightly WP_MULTISITE=0
2017-06-08 21:05:40 +08:00
allow_failures:
2019-08-28 18:07:52 +08:00
- php: 7.3
env: WP_VERSION=latest WP_MULTISITE=0 RUN_CODE_COVERAGE=1
- php: 7.4snapshot
env: WP_VERSION=nightly WP_MULTISITE=0
2017-06-08 21:05:40 +08:00
2017-06-08 21:34:20 +08:00
# whitelist branches for the "push" build check.
branches:
only:
- master
#- master-stable
#- /^branch-.*$/
#- feature/*
# Clones WordPress and configures our testing environment.
2017-06-08 21:05:40 +08:00
before_script:
2017-06-08 21:34:20 +08:00
- phpenv config-rm xdebug.ini
- export PLUGIN_SLUG=$(basename $(pwd))
- source ~/.nvm/nvm.sh
- export PATH="$HOME/.composer/vendor/bin:$PATH"
- |
if [[ ${TRAVIS_PHP_VERSION:0:2} == "7." ]]; then
composer global require "phpunit/phpunit=5.7.*"
elif [[ ${TRAVIS_PHP_VERSION:0:3} != "5.2" ]]; then
composer global require "phpunit/phpunit=4.8.*"
fi
- nvm install 6
- nvm use 6
2017-06-08 22:25:18 +08:00
- chmod +x ./tests/prepare-wordpress.sh
2017-06-08 22:31:44 +08:00
- chmod +x ./tests/run-travis.sh
2017-06-08 21:34:20 +08:00
- ./tests/prepare-wordpress.sh
2019-08-30 20:19:33 +08:00
## - mysql -e "set global wait_timeout = 3600;"
2017-06-08 21:34:20 +08:00
script:
- ./tests/run-travis.sh
sudo: false
# We need notifications for successful builds
2017-06-08 21:05:40 +08:00
2017-06-08 21:34:20 +08:00
notifications:
2019-08-28 18:07:52 +08:00
webhooks: https://ultimatemember.com/travis.php
2017-06-08 21:34:20 +08:00
email:
- heychampsupertramp@gmail.com
2019-08-28 17:09:00 +03:00
- nsinelnikov.work@gmail.com
2017-06-08 21:34:20 +08:00
# Encrypted Slack notification address.
2017-06-08 22:18:57 +08:00
#- secure: "WQdTdmYuifSW0hiJGXpQGKystMASC50QvxHlyUL5SM3h5GP8aCgeSsHuXvKPe3dT3Pffhk0dSHBfDtdWFwSHW/upURhg0vs4dm7+nxxvGZiTPzKcuAIjgvCoqWM7teyda/XqFGNSnv+XsT34uoyPhhFgd45T3oS+QQ3aNCruFak="