Add caching
This commit is contained in:
parent
759feffbee
commit
561e44432a
|
@ -1,7 +1,10 @@
|
||||||
language: php
|
language: php
|
||||||
dist: trusty
|
dist: trusty
|
||||||
sudo: required
|
sudo: required
|
||||||
|
cache:
|
||||||
|
directories:
|
||||||
|
- vendor
|
||||||
|
- $HOME/.composer/cache
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- name: "PHP 7.2 unit tests, PHP Coding standards check"
|
- name: "PHP 7.2 unit tests, PHP Coding standards check"
|
||||||
|
@ -17,6 +20,5 @@ before_script:
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- composer install
|
- 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/phpunit.sh
|
||||||
- bash unit-tests/bin/phpcs.sh
|
- bash unit-tests/bin/phpcs.sh
|
|
@ -1,9 +1,8 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
WORKING_DIR="$PWD"
|
WORKING_DIR="$PWD"
|
||||||
cd "$WP_CORE_DIR/wp-content/plugins/woocommerce-rest-api/"
|
cd "$WP_CORE_DIR/wp-content/plugins/woocommerce-rest-api"
|
||||||
which phpunit
|
./vendor/bin/phpunit --version
|
||||||
phpunit --version
|
./vendor/bin/phpunit -c phpunit.xml
|
||||||
phpunit -c phpunit.xml
|
|
||||||
TEST_RESULT=$?
|
TEST_RESULT=$?
|
||||||
cd "$WORKING_DIR"
|
cd "$WORKING_DIR"
|
||||||
exit $TEST_RESULT
|
exit $TEST_RESULT
|
Loading…
Reference in New Issue