Skip to content

Instantly share code, notes, and snippets.

@aaronjorbin
Created October 23, 2015 03:25
Show Gist options
  • Save aaronjorbin/c3f54dd4cf0ca23002f3 to your computer and use it in GitHub Desktop.
Save aaronjorbin/c3f54dd4cf0ca23002f3 to your computer and use it in GitHub Desktop.
sudo: false
language: php
matrix:
include:
- php: 5.6
before_install:
- WP_CORE_DIR=/tmp/wordpress/
- git clone https://github.com/WordPress/twentysixteen.git src/wp-content/themes/twentysixteen
- |
if [[ true ]]; then
mysql -e "CREATE DATABASE wordpress_tests;" -uroot
cp wp-tests-config-sample.php wp-tests-config.php
sed -i "s/youremptytestdbnamehere/wordpress_tests/" wp-tests-config.php
sed -i "s/yourusernamehere/travis/" wp-tests-config.php
sed -i "s/yourpasswordhere//" wp-tests-config.php
svn checkout https://plugins.svn.wordpress.org/wordpress-importer/trunk tests/phpunit/data/plugins/wordpress-importer
fi
before_script:
- npm install -g npm
- npm install -g grunt-cli
- npm install
- pip install --user codecov
after_success:
- codecov
script: phpunit --coverage-clover=clover.xml
#!/bin/sh
cd /home/jorbin/develop-sync/codecov
git fetch origin
git pull origin master > /dev/null 2>&1
if grep `git rev-parse HEAD` .stored-hash; then
echo "yo" 2>&1
else
rm .travis.yml 2>&1
cp local.travis.yml .travis.yml 2>&1
git add .travis.yml 2>&1
git commit -m "codecov" 2>&1
git push github master --force 2>&1
git reset --hard origin/master 2>&1
git rev-parse HEAD > .stored-hash
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment