-
Notifications
You must be signed in to change notification settings - Fork 707
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable Codecoverage Upload (Jacoco/Codecov) #1981
Changes from all commits
d25e68e
f2dcece
b79dad1
dd8e9a6
a7d58c7
5db2df2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# note that if an org-wide global config is configured, it will be merged (with duplicate settings taking priority from this file) | ||
# it's better to explicitly set all configs if you want consistency | ||
|
||
codecov: | ||
require_ci_to_pass: yes | ||
|
||
coverage: | ||
precision: 2 | ||
round: down | ||
range: "0...100" # acceptable coverage range | ||
|
||
# default behaviour | ||
parsers: | ||
gcov: | ||
branch_detection: | ||
conditional: yes | ||
loop: yes | ||
method: no | ||
macro: no | ||
|
||
# can be configured in https://docs.codecov.com/docs/pull-request-comments | ||
comment: | ||
layout: "reach,diff,flags,files,footer" | ||
behavior: default | ||
require_changes: no |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,41 +4,27 @@ | |
BASE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )"/.. && pwd )" | ||
cd $BASE_DIR | ||
|
||
export JVM_OPTS="-XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC -XX:ReservedCodeCacheSize=96m -XX:+TieredCompilation -XX:MaxPermSize=256m -Xms256m -Xmx512m -Xss2m" | ||
|
||
|
||
INNER_JAVA_OPTS="set javaOptions += \"-Dlog4j.configuration=file://$TRAVIS_BUILD_DIR/project/travis-log4j.properties\"" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I see no references to this variable while searching through the codebase. I don't think it's used anymore |
||
|
||
withCmd() { | ||
CMD=$1 | ||
for t in $TEST_TARGET; do echo -n "; $t/$CMD "; done | ||
} | ||
|
||
bash -c "while true; do echo -n .; sleep 5; done" & | ||
|
||
echo "running..." | ||
|
||
echo time ./sbt -Dhttp.keepAlive=false -Dsbt.repository.secure=true ++$TRAVIS_SCALA_VERSION "$(withCmd "test:compile")" | ||
export JVM_OPTS="-XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC -XX:ReservedCodeCacheSize=168m -XX:+TieredCompilation -XX:MaxPermSize=256m -Xms512m -Xmx1500m -Xss8m" | ||
# collecting code coverage has a fairly high memory pressure | ||
export JVM_OPTS="-XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC -XX:ReservedCodeCacheSize=128m -XX:+TieredCompilation -XX:MaxPermSize=256m -Xms512m -Xmx2g -Xss8m" | ||
|
||
echo "Running test compilation..." | ||
time ./sbt -Dhttp.keepAlive=false -Dsbt.repository.secure=true ++$TRAVIS_SCALA_VERSION "$(withCmd "test:compile")" | ||
|
||
export JVM_OPTS="-XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC -XX:ReservedCodeCacheSize=128m -XX:+TieredCompilation -XX:MaxPermSize=256m -Xms256m -Xmx768m -Xss2m" | ||
echo "calling ... " | ||
echo "time ./sbt ++$TRAVIS_SCALA_VERSION $(withCmd test)" | ||
time ./sbt -Dhttp.keepAlive=false -Dsbt.repository.secure=true ++$TRAVIS_SCALA_VERSION "$(withCmd test)" | ||
echo "Running test suite" | ||
time ./sbt -Dhttp.keepAlive=false -Dsbt.repository.secure=true ++$TRAVIS_SCALA_VERSION "$(withCmd test)" jacocoReport | ||
TST_EXIT_CODE=$? | ||
|
||
echo "Running mima checks ... " | ||
echo "time ./sbt ++$TRAVIS_SCALA_VERSION $(withCmd mimaReportBinaryIssues)" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we already have the bash flags that print out commands before they are run so this isn't really needed |
||
time ./sbt -Dhttp.keepAlive=false -Dsbt.repository.secure=true ++$TRAVIS_SCALA_VERSION "$(withCmd mimaReportBinaryIssues)" | ||
MIMA_EXIT_CODE=$? | ||
|
||
echo "Running compile:doc ... " | ||
echo "time ./sbt ++$TRAVIS_SCALA_VERSION $(withCmd compile:doc)" | ||
time ./sbt -Dhttp.keepAlive=false -Dsbt.repository.secure=true ++$TRAVIS_SCALA_VERSION "$(withCmd compile:doc)" | ||
COMPILE_DOC_EXIT_CODE=$? | ||
|
||
echo "all done" | ||
|
||
exit $(( $TST_EXIT_CODE || $MIMA_EXIT_CODE || $COMPILE_DOC_EXIT_CODE )) | ||
echo "all test checks done" | ||
Comment on lines
-40
to
+30
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we already have bash flags to fail-fast so we don't explicitly need to collect exit codes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
max age is 1h? seems like maybe that should be longer no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fine with whatever. Although github also does their own caching so it's probably a bit irrelevant