Skip to content

Commit

Permalink
Merge pull request #5632 from freedomofpress/y-u-no-codecov
Browse files Browse the repository at this point in the history
Re-enables code coverage analysis via CodeCov
  • Loading branch information
emkll authored Nov 19, 2020
2 parents 8fc17cf + 29bbb53 commit bc80123
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
7 changes: 7 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
codecov:
disable_default_path_fixes: false
ignore:
- "securedrop/upload-screenshots.py"
- "securedrop/qa_loader.py"
- "securedrop/create-dev-data.py"
- "securedrop/specialstrings.py"
10 changes: 9 additions & 1 deletion securedrop/bin/dev-shell
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,16 @@ function docker_run() {
echo "************************************************************"
fi

# If this is a CI run, pass CodeCov settings into the container.
if [ -n "${CIRCLE_BRANCH:-}" ] ; then
ci_env=$(bash <(curl -s https://codecov.io/env))
else
ci_env=""
fi

# The --shm-size argument sets up dedicated shared memory for the
# container. Our tests can fail with the default of 64m.
docker run \
docker run $ci_env \
--shm-size 2g \
--rm \
-p "127.0.0.1:${SD_HOSTPORT_VNC}:5909" \
Expand All @@ -72,6 +79,7 @@ function docker_run() {
-e LANG=C.UTF-8 \
-e PAGE_LAYOUT_LOCALES \
-e PATH \
-e BASE_OS=$BASE_OS \
--user "${USER:-root}" \
--volume "${TOPLEVEL}:${TOPLEVEL}" \
--workdir "${TOPLEVEL}/securedrop" \
Expand Down
2 changes: 1 addition & 1 deletion securedrop/bin/run-test
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ if [ -n "${CIRCLE_BRANCH:-}" ] ; then
touch tests/log/firefox.log
function finish {
cp tests/log/firefox.log ../test-results
bash <(curl -s https://codecov.io/bash)
bash <(curl -s https://codecov.io/bash -cF "$BASE_OS")
}
trap finish EXIT
fi
Expand Down

0 comments on commit bc80123

Please sign in to comment.