Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

travis.yml updated #1

Merged
merged 7 commits into from
Mar 15, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 35 additions & 18 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,26 @@ language: php
notifications:
email:
on_success: never
on_failure: change
on_failure: never

branches:
only:
- master
- develop

cache:
apt: true
directories:
- vendor
- $HOME/.composer/cache

# Set the global environment variables
env:
global:
- WP_CORE_DIR: /tmp/wordpress
- WP_VERSION: latest
- COVERAGE: false

matrix:
include:
- php: 7.2
Expand All @@ -36,18 +46,27 @@ matrix:
env: WP_VERSION=latest
dist: precise

before_script:
- export PATH="$HOME/.composer/vendor/bin:$PATH"
install:
- |
if [ -f ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini ]; then
phpenv config-rm xdebug.ini
else
echo "xdebug.ini does not exist"
fi
cd $TRAVIS_BUILD_DIR
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
chmod +x wp-cli.phar
sudo mv wp-cli.phar /usr/local/bin/wp

before_script:
- |
if [[ ! -z "$WP_VERSION" ]] ; then
bash bin/install-wp-tests.sh wordpress_test root '' localhost $WP_VERSION
composer global require "phpunit/phpunit=4.8.*|5.7.*"
bash bin/install-wp-tests.sh wpgraphql_woocommerce_test root '' 127.0.0.1 $WP_VERSION
composer self-update
composer require lucatume/wp-browser:^2.2
composer install --no-interaction
mkdir -p build/logs
cp tests/acceptance.suite.dist.yml tests/acceptance.suite.yml
cp tests/functional.suite.dist.yml tests/functional.suite.yml
cp tests/unit.suite.dist.yml tests/unit.suite.yml
cp tests/wpunit.suite.dist.yml tests/wpunit.suite.yml
cp .env.dist .env
ls -al
fi
- |
if [[ "$WP_TRAVISCI" == "phpcs" ]] ; then
Expand All @@ -56,12 +75,10 @@ before_script:
fi

script:
- |
if [[ ! -z "$WP_VERSION" ]] ; then
phpunit
WP_MULTISITE=1 phpunit
fi
- |
if [[ "$WP_TRAVISCI" == "phpcs" ]] ; then
phpcs
# Execute unit tests with coverage if specified, otherwise without coverage
- |
if [ $COVERAGE == true ]; then
vendor/bin/codecept run wpunit --coverage --coverage-xml
else
vendor/bin/codecept run wpunit
fi
8 changes: 3 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,17 @@
}
],
"require-dev": {
"lucatume/wp-browser": "^2.2",
"squizlabs/php_codesniffer": "^3.4",
"phpcompatibility/phpcompatibility-wp": "^2.0"
"lucatume/wp-browser": "^2.2"
},
"config": {
"optimize-autoloader": true
},
"autoload": {
"psr-4": {
"WPGraphQL\\Extensions\\WooCommerce": "src/"
"WPGraphQL\\Extensions\\WooCommerce\\": "src/"
},
"classmap": [
"src/"
"src"
]
}
}
211 changes: 1 addition & 210 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions tests/wpunit.suite.dist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ modules:
domain: "%TEST_SITE_WP_DOMAIN%"
adminEmail: "%TEST_SITE_ADMIN_EMAIL%"
title: "Test"
plugins: ['wp-graphql-woocommerce/wp-graphql-woocommerce.php']
activatePlugins: ['wp-graphql-woocommerce/wp-graphql-woocommerce.php']
plugins: ['woocommerce/woocommerce.php', 'wp-graphql/wp-graphql.php', 'wp-graphql-woocommerce/wp-graphql-woocommerce.php']
activatePlugins: ['woocommerce/woocommerce.php', 'wp-graphql/wp-graphql.php', 'wp-graphql-woocommerce/wp-graphql-woocommerce.php']
2 changes: 1 addition & 1 deletion vendor/autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

require_once __DIR__ . '/composer/autoload_real.php';

return ComposerAutoloaderInit39722c342f617a0c804345293b073de0::getLoader();
return ComposerAutoloaderInit243c4e092eb886b317fac9426efa6ad4::getLoader();
Loading