diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 79cd3a6d..414c83f7 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -19,9 +19,9 @@ jobs: - run: ../raven/run_tests --library-report # The overhead time added by checking coverage is currently about 19% for a single run_tests. # Reducing the frequency of coverage checks may be preferable if this increases. + - run: bash coverage_scripts/check_py_coverage.sh -j4 # report_py_coverage is being called twice, once within check_py_coverage to print to the terminal and once here to get data for the annotation - run: > - bash coverage_scripts/check_py_coverage.sh -j4 && DATA_FILE=`pwd`/.coverage && COV_RCFILE=`pwd`/coverage_scripts/.coveragerc && COV_RPT=`bash coverage_scripts/report_py_coverage.sh --data-file=$DATA_FILE --coverage-rc-file=$COV_RCFILE` && echo "::notice title=Coverage Summary::$COV_RPT For details, download 'coverage_results' from Artifacts, extract all files, and open 'index.html'." diff --git a/coverage_scripts/check_py_coverage.sh b/coverage_scripts/check_py_coverage.sh index d26c6be7..e7bbdb77 100644 --- a/coverage_scripts/check_py_coverage.sh +++ b/coverage_scripts/check_py_coverage.sh @@ -9,11 +9,6 @@ source $HERON_DIR/coverage_scripts/initialize_coverage.sh #coverage help run SRC_DIR=`(cd src && pwd)` -# get display var -DISPLAY_VAR=`(echo $DISPLAY)` -# reset it -export DISPLAY= - export COVERAGE_RCFILE="$SRC_DIR/../coverage_scripts/.coveragerc" SOURCE_DIRS=($SRC_DIR,$SRC_DIR/../templates/) OMIT_FILES=($SRC_DIR/dispatch/twin_pyomo_test.py,$SRC_DIR/dispatch/twin_pyomo_test_rte.py,$SRC_DIR/dispatch/twin_pyomo_limited_ramp.py,$SRC_DIR/ArmaBypass.py) @@ -23,9 +18,6 @@ export COVERAGE_FILE=`pwd`/.coverage coverage erase ($RAVEN_DIR/run_tests "$@" --re=HERON/tests --python-command="coverage run $EXTRA " || echo run_tests done but some tests failed) -#get DISPLAY BACK -DISPLAY=$DISPLAY_VAR - ## Prepare data and generate the html documents coverage combine coverage html