From b0e5d426e571c7311e2ed3313b2618ac08e01a9c Mon Sep 17 00:00:00 2001 From: Daniel Hensby Date: Tue, 14 Feb 2017 22:05:32 +0000 Subject: [PATCH] Run code coverage upload after success (#6609) --- .travis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index a8b83600b..586406e3e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -62,9 +62,11 @@ script: - "if [ \"$NPM_TEST\" = \"1\" ]; then git diff -w --no-color; fi" - "if [ \"$NPM_TEST\" = \"1\" ]; then npm run test; fi" - "if [ \"$NPM_TEST\" = \"1\" ]; then npm run lint; fi" + - "if [ \"$PHPCS_TEST\" = \"1\" ]; then composer run-script lint; fi" + +after_success: - "if [ \"$PHPUNIT_COVERAGE_TEST\" = \"1\" ] && [ \"$CMS_TEST\" = \"\" ]; then phpdbg -qrr ./vendor/bin/phpunit --coverage-clover=coverage.xml; fi" - "if [ \"$PHPUNIT_COVERAGE_TEST\" = \"1\" ] && [ \"$CMS_TEST\" = \"\" ]; then bash <(curl -s https://codecov.io/bash) -f coverage.xml; fi" - - "if [ \"$PHPCS_TEST\" = \"1\" ]; then composer run-script lint; fi" after_failure: - php ./tests/behat/travis-upload-artifacts.php --if-env BEHAT_TEST,ARTIFACTS_BUCKET,ARTIFACTS_KEY,ARTIFACTS_SECRET --target-path $TRAVIS_REPO_SLUG/$TRAVIS_BUILD_ID/$TRAVIS_JOB_ID --artifacts-base-url https://s3.amazonaws.com/$ARTIFACTS_BUCKET/