#!/usr/bin/env bash set -ex .circleci/setup_git PATH=/usr/local/share/.config/yarn/global/node_modules/.bin:$PATH CLI_ENGINE_UTIL_YARN_ARGS="--frozen-lockfile" if [[ "$CIRCLE_BRANCH" == greenkeeper/* ]]; then CLI_ENGINE_GREENKEEPER_BRANCH=1 CLI_ENGINE_UTIL_YARN_ARGS="" if [[ ! -x "$(command -v greenkeeper-lockfile-update)" ]]; then yarn global add greenkeeper-lockfile@1 fi greenkeeper-lockfile-update fi yarn install $CLI_ENGINE_UTIL_YARN_ARGS if [[ "$CLI_ENGINE_GREENKEEPER_BRANCH" == 1 ]]; then greenkeeper-lockfile-upload fi yarn add -D nyc@11 @anycli/nyc-config@0 mocha-junit-reporter@1<%- semantic_release ? " @commitlint/cli@6 @commitlint/config-conventional@6" : "" %> <%_ if (type === 'single' || type === 'multi') { _%> ./bin/run -v ./bin/run --help <%_ } else if (type === 'plugin') { _%> ./bin/run --help <%_ } _%> mkdir -p reports NYC=(yarn exec nyc -- --nycrc-path node_modules/@anycli/nyc-config/.nycrc) MOCHA_FILE=reports/mocha.xml "${NYC[@]}" yarn test --reporter mocha-junit-reporter "${NYC[@]}" report --reporter text-lcov > coverage.lcov curl -s https://codecov.io/bash | bash <%_ if (semantic_release) { _%> yarn exec commitlint -- -x @commitlint/config-conventional --from origin/master <%_ } _%>