mirror of https://github.com/zulip/zulip.git
circleci: Upload coverage reports to codecov.io.
The Travis config does this by a `pip install codecov` in setup and running the resulting `codecov` command at the end. That risks confusion because it makes the library look like something we might be using *during* the tests to collect coverage information. Instead, install and run codecov together at the end. (The docs also suggest using their bash-based uploader instead; but following those directions seems to result in coverage.xml not getting included (maybe not even built), and no coverage data getting uploaded for Python source files, only JavaScript. Not sure why that is, but using the pip package is fine.) Also, because this step is inherently about talking to a third-party service whose reliability we can't control, and because it's purely a reporting step that happens after our actual test suite has succeeded, don't fail if it fails; just print a message. (I'd prefer a somewhat louder message, like turning that step yellow or something in the Circle web UI, but Circle doesn't offer an option like that. If the coverage reports start consistently failing for some reason, then if we're actually reading them we'll notice anyway.) [greg: Edited step name and error message; wrote this commit message.]
This commit is contained in:
parent
3b600d5591
commit
57d2d3ada5
|
@ -34,8 +34,6 @@ jobs:
|
|||
# Install moreutils so we can use `ts` and `mispipe` in the following.
|
||||
sudo apt-get install -y moreutils
|
||||
|
||||
# TODO: Install and use codecov.
|
||||
|
||||
# CircleCI sets the following in Git config at clone time:
|
||||
# url.ssh://git@github.com.insteadOf https://github.com
|
||||
# This breaks the Git clones in the NVM `install.sh` we run
|
||||
|
@ -75,6 +73,13 @@ jobs:
|
|||
. /srv/zulip-py3-venv/bin/activate
|
||||
mispipe ./tools/travis/frontend ts
|
||||
|
||||
- run:
|
||||
name: upload coverage report
|
||||
command: |
|
||||
. /srv/zulip-py3-venv/bin/activate
|
||||
pip install codecov && codecov \
|
||||
|| echo "Error in uploading coverage reports to codecov.io."
|
||||
|
||||
# - store_artifacts: # TODO
|
||||
# path: var/casper/
|
||||
# # also /tmp/zulip-test-event-log/
|
||||
|
|
Loading…
Reference in New Issue