Skip to content

Commit

Permalink
Use CoverageRC, Make CodeCov Less Aggressive (#1705)
Browse files Browse the repository at this point in the history
* Experimental coverage changes

Tells coverage.py to record coverage for individual test cases, and makes CodeCov tolerate a small drop in overall coverage percentage to account for nondeterministic gas tests.

* Use workspace

* Remove explicit concurrency type declaration

Appears to break use of subprocess in integration tests

* Eliminate dynamic context

* Make all CI respect rcfile

* Use environment variable
  • Loading branch information
Eric Hennenfent committed May 19, 2020
1 parent c39f870 commit 2c90ee0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ jobs:
run: |
# Launches all examples; this assumes PWD is examples/script
launch_examples() {
COVERAGE_RCFILE=$GITHUB_WORKSPACE/.coveragerc
# concolic assumes presence of ../linux/simpleassert
echo "Running concolic.py..."
HW=../linux/helloworld
Expand Down Expand Up @@ -150,6 +151,7 @@ jobs:
}
run_truffle_tests(){
COVERAGE_RCFILE=$GITHUB_WORKSPACE/.coveragerc
mkdir truffle_tests
cd truffle_tests
truffle unbox metacoin
Expand All @@ -169,8 +171,9 @@ jobs:
run_tests_from_dir() {
DIR=$1
COVERAGE_RCFILE=$GITHUB_WORKSPACE/.coveragerc
echo "Running only the tests from 'tests/$DIR' directory"
pytest --durations=100 --cov=manticore -n auto "tests/$DIR"
pytest --durations=100 --cov=manticore --cov-config=$GITHUB_WORKSPACE/.coveragerc -n auto "tests/$DIR"
coverage xml
}
Expand Down
4 changes: 4 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,7 @@ codecov:
# If we add or remove any, we need to change this number.
after_n_builds: 9
wait_for_ci: yes
status:
project:
default:
threshold: 0.2%
2 changes: 0 additions & 2 deletions setup.cfg

This file was deleted.

0 comments on commit 2c90ee0

Please sign in to comment.