{"id":411,"date":"2018-04-28T11:18:28","date_gmt":"2018-04-28T03:18:28","guid":{"rendered":"https:\/\/www.zhuyanbin.com\/?p=411"},"modified":"2018-04-28T11:20:49","modified_gmt":"2018-04-28T03:20:49","slug":"%e4%bd%bf%e7%94%a8travis-ci%e8%bf%9b%e8%a1%8ccoveralls%e5%90%8c%e6%ad%a5%e6%97%b6%e6%8a%a5problems-with-travis-ci-environment%e9%94%99%e8%af%af%e7%9a%84%e8%a7%a3%e5%86%b3%e6%96%b9%e6%b3%95","status":"publish","type":"post","link":"https:\/\/www.yanbin888.com\/?p=411","title":{"rendered":"Problems with Travis CI environment\u7684\u89e3\u51b3\u65b9\u6cd5"},"content":{"rendered":"<div>\u4f7f\u7528travis ci\u8fdb\u884ccoveralls\u540c\u6b65\u65f6\uff0c\u4f1a\u51fa\u73b0\u5982\u4e0b\u9519\u8bef\uff1a<\/div>\n<div><code>Collect git info<br \/>\nRead environment variables<br \/>\nRequirements are not satisfied.<br \/>\n- TRAVIS='true'<br \/>\n- TRAVIS_JOB_ID='18683918'<br \/>\n- CI_NAME='travis-ci'<br \/>\n- COVERALLS_REPO_TOKEN='[security]'<br \/>\nSet environment variables properly like the following.<br \/>\nFor Travis users:<br \/>\n- TRAVIS<br \/>\n- TRAVIS_JOB_ID<br \/>\nFor CircleCI users:<br \/>\n- CIRCLECI<br \/>\n- CIRCLE_BUILD_NUM<br \/>\n- COVERALLS_REPO_TOKEN<br \/>\nFor Jenkins users:<br \/>\n- JENKINS_URL<br \/>\n- BUILD_NUMBER<br \/>\n- COVERALLS_REPO_TOKEN<br \/>\nFrom local environment:<br \/>\n- COVERALLS_RUN_LOCALLY<br \/>\n- COVERALLS_REPO_TOKEN<\/code><\/div>\n<div><\/div>\n<div>\u89e3\u51b3\u65b9\u6cd5\uff1a<\/div>\n<div>\u5728\u811a\u672c\u4e2d\u6dfb\u52a0\u5982\u4e0b\u51e0\u884c\u547d\u4ee4\u5373\u53ef\uff1a<\/div>\n<div><code>after_success:<br \/>\n- export CI_BUILD_NUMBER=\"$TRAVIS_BUILD_NUMBER\"<br \/>\n- export CI_PULL_REQUEST=\"$TRAVIS_PULL_REQUEST\"<br \/>\n- export CI_BRANCH=\"$TRAVIS_BRANCH\"<br \/>\n- travis_retry php vendor\/bin\/php-coveralls -v<br \/>\n<\/code><\/div>\n<p><audio style=\"display: none;\" controls=\"controls\"><\/audio><\/p>\n<p><audio style=\"display: none;\" controls=\"controls\"><\/audio><\/p>\n<p><audio style=\"display: none;\" controls=\"controls\"><\/audio><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4f7f\u7528travis ci\u8fdb\u884ccoveralls\u540c\u6b65\u65f6\uff0c\u4f1a\u51fa\u73b0\u5982\u4e0b\u9519\u8bef\uff1a Collect git info Rea <span class=\"ellipsis\">&hellip;<\/span> <span class=\"more-link-wrap\"><a href=\"https:\/\/www.yanbin888.com\/?p=411\" class=\"more-link\"><span>Read More &rarr;<\/span><\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[44,3,43],"tags":[45,46],"class_list":["post-411","post","type-post","status-publish","format-standard","hentry","category-coveralls","category-php","category-travis-ci","tag-coveralls","tag-travis"],"_links":{"self":[{"href":"https:\/\/www.yanbin888.com\/index.php?rest_route=\/wp\/v2\/posts\/411","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.yanbin888.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.yanbin888.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.yanbin888.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.yanbin888.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=411"}],"version-history":[{"count":5,"href":"https:\/\/www.yanbin888.com\/index.php?rest_route=\/wp\/v2\/posts\/411\/revisions"}],"predecessor-version":[{"id":416,"href":"https:\/\/www.yanbin888.com\/index.php?rest_route=\/wp\/v2\/posts\/411\/revisions\/416"}],"wp:attachment":[{"href":"https:\/\/www.yanbin888.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=411"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.yanbin888.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=411"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.yanbin888.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=411"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}