2016-02-19 08:00:59 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2016-02-19 17:39:05 +00:00
|
|
|
CI_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
2017-04-09 08:42:16 +00:00
|
|
|
# shellcheck source=/dev/null
|
2016-02-19 17:39:05 +00:00
|
|
|
source "${CI_DIR}/common.sh"
|
|
|
|
|
|
|
|
set +e
|
|
|
|
|
2017-10-11 06:38:30 +00:00
|
|
|
if [ -z "${CIRCLE_PULL_REQUEST}" ] && [ "${CIRCLE_BRANCH}" = 'master' ]; then
|
|
|
|
echo "CIRCLE_NODE_INDEX: ${CIRCLE_NODE_INDEX}"
|
2020-02-02 19:35:21 +00:00
|
|
|
if [ "${CIRCLE_NODE_INDEX}" = 1 ]; then
|
2017-10-11 06:38:30 +00:00
|
|
|
echo -e "\\n${ANSI_GREEN}Running make testfront for timings."
|
|
|
|
make testfront BUSTED_OVERRIDES="--output=junit -Xoutput junit-test-results.xml"
|
|
|
|
fi
|
|
|
|
|
2020-02-02 19:35:21 +00:00
|
|
|
if [ "${CIRCLE_NODE_INDEX}" = 0 ]; then
|
2017-10-11 06:38:30 +00:00
|
|
|
travis_retry make coverage
|
|
|
|
pushd koreader-*/koreader && {
|
|
|
|
# see https://github.com/codecov/example-lua
|
|
|
|
bash <(curl -s https://codecov.io/bash)
|
|
|
|
} && popd || exit
|
|
|
|
fi
|
2016-02-22 01:46:19 +00:00
|
|
|
else
|
2022-01-04 21:17:40 +00:00
|
|
|
echo -e "\\n${ANSI_GREEN}Not on official master branch. Skipping coverage."
|
2016-02-19 17:39:05 +00:00
|
|
|
fi
|