Skip to content

Commit

Permalink
GHA fix (#204)
Browse files Browse the repository at this point in the history
* if tests pass, GHA passes
* if tests fail, GHA fails
  • Loading branch information
Xiangs18 authored Jan 4, 2024
1 parent c8c6948 commit d67e35b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/kb_sdk_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 2 additions & 1 deletion scripts/run_tests_within_container.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit d67e35b

Please sign in to comment.