Add caching

This commit is contained in:
Mike Jolley 2019-06-11 11:10:55 +01:00
parent 759feffbee
commit 561e44432a
2 changed files with 7 additions and 6 deletions

View File

@ -1,7 +1,10 @@
language: php
dist: trusty
sudo: required
cache:
directories:
- vendor
- $HOME/.composer/cache
matrix:
include:
- name: "PHP 7.2 unit tests, PHP Coding standards check"
@ -17,6 +20,5 @@ before_script:
script:
- composer install
- export PATH="$WP_CORE_DIR/wp-content/plugins/woocommerce-rest-api/vendor/bin:$PATH"
- bash unit-tests/bin/phpunit.sh
- bash unit-tests/bin/phpcs.sh

View File

@ -1,9 +1,8 @@
#!/usr/bin/env bash
WORKING_DIR="$PWD"
cd "$WP_CORE_DIR/wp-content/plugins/woocommerce-rest-api/"
which phpunit
phpunit --version
phpunit -c phpunit.xml
cd "$WP_CORE_DIR/wp-content/plugins/woocommerce-rest-api"
./vendor/bin/phpunit --version
./vendor/bin/phpunit -c phpunit.xml
TEST_RESULT=$?
cd "$WORKING_DIR"
exit $TEST_RESULT