-
Notifications
You must be signed in to change notification settings - Fork 7
/
.travis.yml
65 lines (65 loc) · 3.65 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
language: php
sudo: false
services:
- mysql
matrix:
include:
- php: 7.3
env:
global:
- WP_VERSION=master WP_MULTISITE=0
- secure: WYH4JaFh+qKyBlrwVf6irhrYLJ7RSXXJqiElQAwXz1FbdB7njDM/qGlvGdH0uvM0xUEaHEiMl7qs4F5W9H9yjRkK9Vp4mfR9UkWWCmPP1JslW5/scpxyg8+lYwFXmNmqLW69xVqQgQDJFab5Dn/Jpct/oF7ijBiYHl0eopNnDrGDB956JtLLiHmQe3Rqi6zaPzR8/a0Xv0NGSi2nOMrkIZlkg5h9J5ZT6lssrNmgUvFqW1sr85LBWguW+L8BkGPly55UpxheAt2NQ3G2KYKsAU68uBcO6sQUezV3RdSJ1ShyrP+OgMKK55n/VV9BOMcy+ZUL4q4os6YhmzFdv/ySnn3azKEHuBuaiVF5aEcgPzPgeQqVYFC7G3gZirrZyFQ7fthX9MOmKHtT4KMLh7sZk8monWODz0Bct8MJGZrF43OyaBwpFqwpHA9AW5bkZxURgEGWs8UtK6JbXcgV2oYc4HyTXfnqDgywXAI9y+A8WmiIvlmTL7rQqzqbWJvN2e7T2gpXsg0BmKqIt/K1sR5KZoh9B1pwMAAfVc2ip6Ibduu5NvvyFE+PdlwFrprD8RFg9aihrDkPDXK0flAxqVKgsx0yJq8jvjWpn5F3+pcsNuQKpMQZPzZ8R+09JynvIiikCiZ8L9IGVR0zJ6lzTiyeMw/erBwNaYtPpAss9mt7rxg=
notifications:
slack:
secure: U0C7obTxqgI1blt1RIhIY+M3mU94CgSVMCP3oWtPyVaXrDwYdlSZvqXGCdezJXqVzFOcMEytDlKMJxo1zM6fnXlpqvUllBGm2IJkpQj6ijUr+uQy6bVqMWQiIWDho8XRKH3GoYa812XSsNJOROX+let9JiXiO5qz0DWSs3FQ4gl+Ti+E/Znck9yE32AfY5rHEhtkbN2ih/Agx7o+8PkdGG2BGr6hqfn/Gf1sHiUA6KifdoD6lZRR/nym/1osEMlkuavbY4tOf+RBvUTpSpyBDthPXmgXCPJZ8iGGTKySic7KF367AXITWNWdZxX0ChzNB6WcmJWvdvghbxRnIZXN3nML+gtXclmNnH8GOO4iLyXtUbyh7JpoZh/5KVnqP2hmgjPzBGNm84JBmZuqB7jIKHAZwWh66u9k03uteM5wrYNxQBYvDHvTaeeP7TnOBDWhUkjvEacx61TpxmUCb6VGHahSv/MuqaAEpvolcj83BPBC4fjrLA3dj6u+WjYxTqRZeA9A35eW6qT3182beKHCj+GfN1PfsMRGCyqebxcj6CMLgGti0UMgFUBBp1w30z54vKq/lpIRCgMYXQWbETJPLhez76u9MqVCc1j9JoxD6o7we3BsvYtOhngnCbKLcpDzsQK8q/TTtVB/etfQcYdir6lkJn4wAQbvoM5US8uPQ7w=
before_script:
- nvm install 10.13.0
- nvm use 10.13.0
- npm install --global gulp-cli
- yarn install && yarn run build
- export WP_DEVELOP_DIR=/tmp/wordpress/
- export BGTFW_THEME_DIR=$WP_DEVELOP_DIR/src/wp-content/themes/prime
- mkdir -p $WP_DEVELOP_DIR
- git clone --depth=1 --branch="$WP_VERSION" git://develop.git.wordpress.org/ $WP_DEVELOP_DIR
- framework_dir=$(basename $(pwd))/boldgrid-theme-framework
- cd ..
- git clone -b master https://github.com/boldgrid/prime $BGTFW_THEME_DIR
- cp -r $framework_dir/. $BGTFW_THEME_DIR/inc/boldgrid-theme-framework
- 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/2.9.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/0.10.0.tar.gz | tar xz --strip-components=1 -C wordpress-coding-standards
- cd php-codesniffer
- scripts/phpcs --config-set installed_paths ../wordpress-coding-standards
- cd $BGTFW_THEME_DIR
- phpenv rehash
- echo 'error_reporting = E_ERROR' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
script:
- find . \( -name '*.php' \) -exec php -lf {} \; >/dev/null
- "$WP_DEVELOP_DIR/php-codesniffer/scripts/phpcs -p -s -v -n . --standard=$TRAVIS_BUILD_DIR/phpcs.ruleset.xml --ignore=*partials/hover-colors-only.php,*/scssphp/*,*/kirki/*,*/wp_bootstrap_navwalker.php,*/woocommerce/*,*/sa_templates/*,functions.php --extensions=php"
- cd $TRAVIS_BUILD_DIR
deploy:
- provider: script
script: node build/build-zip.js
skip_cleanup: true
on:
tags: true
php: '7.3'
- provider: releases
skip_cleanup: true
api_key: "${GITHUB_TOKEN}"
file: bgtfw.zip
on:
tags: true
php: '7.3'
- provider: script
skip_cleanup: true
script: node build/remote-update.js
on:
tags: true
php: '7.3'