diff --git a/.github/workflows/kb_sdk_test.yaml b/.github/workflows/kb_sdk_test.yaml index 386b3452..ebb0a1bd 100644 --- a/.github/workflows/kb_sdk_test.yaml +++ b/.github/workflows/kb_sdk_test.yaml @@ -54,4 +54,8 @@ jobs: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} run: | sh $GITHUB_WORKSPACE/kb_sdk_actions/bin/kb-sdk test - bash <(curl -s https://codecov.io/bash) + + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v3 + with: + fail_ci_if_error: true diff --git a/Makefile b/Makefile index c0867b95..1d652ee9 100644 --- a/Makefile +++ b/Makefile @@ -51,7 +51,6 @@ build-test-script: echo 'export PYTHONPATH=$$script_dir/../$(LIB_DIR):$$PATH:$$PYTHONPATH' >> $(TEST_DIR)/$(TEST_SCRIPT_NAME) echo 'cd $$script_dir/../$(TEST_DIR)' >> $(TEST_DIR)/$(TEST_SCRIPT_NAME) echo 'python -m nose --with-coverage --cover-package=$(SERVICE_CAPS) --cover-html --cover-html-dir=/kb/module/work/test_coverage --cover-xml --cover-xml-file=/kb/module/work/test_coverage/coverage.xml --nocapture --nologcapture .' >> $(TEST_DIR)/$(TEST_SCRIPT_NAME) - echo 'cp /kb/module/.coveragerc .' >> $(TEST_DIR)/$(TEST_SCRIPT_NAME) echo 'cp .coverage /kb/module/work/' >> $(TEST_DIR)/$(TEST_SCRIPT_NAME) echo 'mkdir -p /kb/module/work/kb/module/lib/' >> $(TEST_DIR)/$(TEST_SCRIPT_NAME) echo 'cp -R /kb/module/lib/$(SERVICE_CAPS)/ /kb/module/work/kb/module/lib/' >> $(TEST_DIR)/$(TEST_SCRIPT_NAME) diff --git a/scripts/run_tests_within_container.sh b/scripts/run_tests_within_container.sh index 74f21e85..5ce658c0 100644 --- a/scripts/run_tests_within_container.sh +++ b/scripts/run_tests_within_container.sh @@ -9,7 +9,8 @@ export TEST_PATH=. cd $script_dir/../test python -m nose --with-coverage --cover-package=GenomeFileUtil --cover-html --cover-html-dir=/kb/module/work/test_coverage --cover-xml --cover-xml-file=/kb/module/work/test_coverage/coverage.xml --nocapture --nologcapture $TEST_PATH -cp /kb/module/.coveragerc . +returncode=$? +if [ $returncode != 0 ]; then exit $returncode; fi cp .coverage /kb/module/work/ mkdir -p /kb/module/work/kb/module/lib/ cp -R /kb/module/lib/GenomeFileUtil/ /kb/module/work/kb/module/lib/P