123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- language: php
- php:
- - "7.0"
- - "5.6"
- - "5.5"
- - "5.4"
- - "5.3"
-
- - "5.2"
- sudo: false
- env:
-
-
- - WP_VERSION=master WP_MULTISITE=0
- before_script:
-
- - 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
- - 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
-
- - mysql -e 'CREATE DATABASE wordpress_test;' -uroot
-
- - mkdir php-codesniffer && curl -L https://github.com/squizlabs/PHP_CodeSniffer/archive/master.tar.gz | tar xz --strip-components=1 -C php-codesniffer
-
- - 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
-
- - cd php-codesniffer
-
-
- - scripts/phpcs --config-set installed_paths ../wordpress-coding-standards
-
- - cd $theme_dir
-
- - phpenv rehash
-
-
- - npm install -g jscs
-
-
- - npm install -g jshint
- - wget https://develop.svn.wordpress.org/trunk/.jshintrc
- script:
-
- - find . \( -name '*.php' \) -exec php -lf {} \;
-
- - jshint .
-
- - jscs .
-
-
-
-
-
-
-
-
-
- - $WP_DEVELOP_DIR/php-codesniffer/scripts/phpcs -p -s -v -n . --standard=./codesniffer.ruleset.xml --extensions=php
|