buddypress/.travis.yml
Paul Gibbs 78153bbf07 Build: add SCSS linter (grunt-scss-lint) to Grunt build process.
As part of the companion stylesheet changes for BP 2.3 (#6291 #6338), we'll be adding SCSS files to `src/bp-templates/bp-legacy/css/` to help modernise our CSS workflow. This change adds a SCSS linter to help us maintain our code quality.

An empty `src/bp-templates/bp-legacy/css/twentyfifteen.scss` file has been added because the linter hangs if you tell it to run in a folder that does not contain any SCSS files. This will be replaced shortly with the real companion stylesheet for `twentyfifteen` (#6291).

As `grunt-scss-lint` relies on a ruby gem, the Travis-CI config has been modified to install it before running tests.

Fixes #6351, props netweb.

git-svn-id: https://buddypress.svn.wordpress.org/trunk@9697 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
2015-04-05 14:21:26 +00:00

76 lines
2.5 KiB
YAML

# Travis CI Configuration File
# Use new Travis container-based infrastructure
# http://docs.travis-ci.com/user/workers/container-based-infrastructure/
sudo: false
language: php
php:
- 5.2
- 5.3
- 5.4
- 5.5
- 5.6
# WordPress comes from the Git mirror, where 'master' mirrors svn 'trunk' and
# x.y mirrors the latest from the x.y branch
env:
- WP_VERSION=master
- WP_VERSION=4.1
- WP_VERSION=4.0
- WP_VERSION=3.9
- WP_VERSION=3.8
- WP_VERSION=3.7
matrix:
fast_finish: true
include:
- php: nightly
env: WP_VERSION=master
allow_failures:
- php: nightly
# before_install: Failures in this section will result in build status 'errored'
before_install:
# set up WP install
- 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
- plugin_slug=$(basename $(pwd))
- plugin_dir=$WP_DEVELOP_DIR/src/wp-content/plugins/$plugin_slug
- cd ..
- mv $plugin_slug $plugin_dir
# set up tests config
- cd $WP_DEVELOP_DIR
- echo $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
# disable WP_DEBUG for PHP >= 5.5 due to ext/mysqli E_DEPRECATED errors
- if [[ "$TRAVIS_PHP_VERSION" > 5.4* ]] && [[ "$WP_VERSION" == "3.7" ]] ; then sed -i "s:define( 'WP_DEBUG://define( 'WP_DEBUG:" wp-tests-config.php; fi;
# set up database
- mysql -e 'CREATE DATABASE wordpress_test;' -uroot
# prepare for running the tests
- cd $plugin_dir
- npm install -g grunt-cli
- gem install scss-lint
# before_script: Failures in this section will result in build status 'errored'
before_script:
- npm install
# Run tests
script: grunt travis
notifications:
email: false
irc:
channels:
- secure: "Z+gAlyOafrw0Xg294np+7IpqOKTsswGjAWyOZsbzT7Xo8uY1nmz8tTuU50Gpo8jo5HQqG9G0QgI3zB3Cxy3M5dF+J5oLl1lBz1zL0mtHiq1HoXi2cbVnGCCpxtMvYII6UmPUGAg8zvNUQol+cw1jb3PzLwEDfGcDH64o/Z3j8Gg="
template:
- "Build %{build_number} (%{branch} - %{commit}): %{message} %{build_url}"
slack:
secure: JQT+HWoVhLzoG00HmJscYZO+Gy7ywnIlrUbCaI7DxFdFOIkKxsTLLq9cKE4y3VqgZAARTOKjP1eQ7a5OEg1vT11Ow+rB7iUAMNmITxXO4feTOx1i2673xRNBro/SZMhlLd7DY2erbMDZaG9hBQB4xLXRYOvP29pLxf5zTSyZMyE=