[CI] Switch to Codecov (#3336)

The debug output from Coveralls was rubbish. `"Build processing error"`
Besides some basics like checking if we were actually sending
valid JSON that gives us absolutely nothing to work with.
pull/3338/head
Frans de Jonge 7 years ago committed by GitHub
parent fa7763f59b
commit aaab777ddb

@ -6,12 +6,10 @@ source "${CI_DIR}/common.sh"
set +e set +e
echo "$CIRCLE_NODE_INDEX" echo "CIRCLE_NODE_INDEX: ${CIRCLE_NODE_INDEX}"
if [ ! "$CIRCLE_NODE_INDEX" = 0 ]; then if [ ! "$CIRCLE_NODE_INDEX" = 0 ]; then
echo -e "\\n${ANSI_GREEN}Not on first node. Skipping documentation update and coverage." echo -e "\\n${ANSI_GREEN}Not on first node. Skipping documentation update and coverage."
elif [ -z "${CIRCLE_PULL_REQUEST}" ] && [ "${CIRCLE_BRANCH}" = 'master' ]; then elif [ -z "${CIRCLE_PULL_REQUEST}" ] && [ "${CIRCLE_BRANCH}" = 'master' ]; then
travis_retry luarocks --local install ldoc
echo -e "\\n${ANSI_GREEN}Checking out koreader/doc for update." echo -e "\\n${ANSI_GREEN}Checking out koreader/doc for update."
git clone git@github.com:koreader/doc.git koreader_doc git clone git@github.com:koreader/doc.git koreader_doc
@ -34,13 +32,10 @@ elif [ -z "${CIRCLE_PULL_REQUEST}" ] && [ "${CIRCLE_BRANCH}" = 'master' ]; then
echo -e "\\n${ANSI_GREEN}Documentation update pushed." echo -e "\\n${ANSI_GREEN}Documentation update pushed."
} && popd || exit } && popd || exit
# rerun make to regenerate /spec dir (was deleted to prevent uploading to cache)
echo -e "\\n${ANSI_GREEN}make all"
make all
travis_retry make coverage travis_retry make coverage
pushd koreader-*/koreader && { pushd koreader-*/koreader && {
# temporarily use || true so builds won't fail until we figure out the coverage issue # see https://github.com/codecov/example-lua
luajit "$(which luacov-coveralls)" --verbose || true bash <(curl -s https://codecov.io/bash)
} && popd || exit } && popd || exit
else else
echo -e "\\n${ANSI_GREEN}Not on official master branch. Skipping documentation update and coverage." echo -e "\\n${ANSI_GREEN}Not on official master branch. Skipping documentation update and coverage."

@ -13,9 +13,9 @@ travis_retry luarocks --local install luafilesystem
travis_retry luarocks --local install ansicolors travis_retry luarocks --local install ansicolors
travis_retry luarocks --local install busted 2.0.rc12-1 travis_retry luarocks --local install busted 2.0.rc12-1
#- mv -f $HOME/.luarocks/bin/busted_bootstrap $HOME/.luarocks/bin/busted #- mv -f $HOME/.luarocks/bin/busted_bootstrap $HOME/.luarocks/bin/busted
travis_retry luarocks --local install luacov
# luasec doesn't automatically detect 64-bit libs
travis_retry luarocks --local install luasec OPENSSL_LIBDIR=/usr/lib/x86_64-linux-gnu
travis_retry luarocks --local install luacov-coveralls --server=http://rocks.moonscript.org/dev
travis_retry luarocks --local install luacheck travis_retry luarocks --local install luacheck
travis_retry luarocks --local install lanes # for parallel luacheck travis_retry luarocks --local install lanes # for parallel luacheck
# used only on master branch but added to cache for better speed
travis_retry luarocks --local install ldoc
travis_retry luarocks --local install luacov

@ -7,7 +7,7 @@ jobs:
EMULATE_READER: 1 EMULATE_READER: 1
# this is for shellcheck 0.4.5 and lower; can be removed for 0.4.6 # this is for shellcheck 0.4.5 and lower; can be removed for 0.4.6
LC_ALL: en_US.UTF8 LC_ALL: en_US.UTF8
parallelism: 4 parallelism: 3
steps: steps:
- checkout - checkout
- restore_cache: - restore_cache:
@ -25,9 +25,20 @@ jobs:
- run: - run:
name: setup name: setup
command: .ci/before_install.sh command: .ci/before_install.sh
# installs and caches testing tools
- run: - run:
name: install name: install
command: .ci/install.sh command: .ci/install.sh
- save_cache:
key: deps-{{ arch }}-{{ checksum ".ci/install.sh" }}
paths:
- "/home/ko/bin"
- "/home/ko/.luarocks"
# compiled luarocks binaries
- "install"
# installs everything and caches base
- run: - run:
name: fetch name: fetch
command: .ci/fetch.sh command: .ci/fetch.sh
@ -37,25 +48,19 @@ jobs:
- run: - run:
name: build name: build
command: .ci/build.sh command: .ci/build.sh
- run: # we want to save cache prior to testing so we don't have to clean it up
name: test
command: .ci/test.sh
- run:
name: cleanup
command: .ci/after_success.sh
- run:
name: clean up cache
command: rm -frv ./base/build/*/{spec,cache/*}
- save_cache: - save_cache:
key: build-{{ arch }}-{{ checksum "git-rev-base" }} key: build-{{ arch }}-{{ checksum "git-rev-base" }}
paths: paths:
- "/home/ko/.ccache" - "/home/ko/.ccache"
- "base" - "base"
- save_cache:
key: deps-{{ arch }}-{{ checksum ".ci/install.sh" }} # our lovely unit tests
paths: - run:
- "/home/ko/bin" name: test
- "/home/ko/.luarocks" command: .ci/test.sh
# compiled luarocks binaries
- "install" # docs and coverage, master branch only
- run:
name: docs-and-coverage
command: .ci/after_success.sh

@ -300,8 +300,8 @@ http://ccache.samba.org
[linux-vm]:http://www.howtogeek.com/howto/11287/how-to-run-ubuntu-in-windows-7-with-vmware-player/ [linux-vm]:http://www.howtogeek.com/howto/11287/how-to-run-ubuntu-in-windows-7-with-vmware-player/
[l10n-readme]:https://github.com/koreader/koreader/blob/master/l10n/README.md [l10n-readme]:https://github.com/koreader/koreader/blob/master/l10n/README.md
[koreader-transifex]:https://www.transifex.com/projects/p/koreader/ [koreader-transifex]:https://www.transifex.com/projects/p/koreader/
[coverage-badge]:https://coveralls.io/repos/github/koreader/koreader/badge.svg?branch=master [coverage-badge]:https://codecov.io/gh/koreader/koreader/branch/master/graph/badge.svg
[coverage-link]:https://coveralls.io/github/koreader/koreader?branch=master [coverage-link]:https://codecov.io/gh/koreader/koreader
[licence-badge]:http://img.shields.io/badge/licence-AGPL-brightgreen.svg [licence-badge]:http://img.shields.io/badge/licence-AGPL-brightgreen.svg
[gitter-badge]:https://badges.gitter.im/Join%20Chat.svg [gitter-badge]:https://badges.gitter.im/Join%20Chat.svg
[gitter-link]:https://gitter.im/koreader/koreader?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge [gitter-link]:https://gitter.im/koreader/koreader?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge

Loading…
Cancel
Save