forked from apache/systemds
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SYSTEMDS-3776] Code coverage in GitHub Actions (Python)
This commit hopefully adds code coverage for the Python API. It should activate after merging to main. Closes #2263
- Loading branch information
1 parent
c3ac73c
commit 665abc1
Showing
3 changed files
with
16 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -128,15 +128,15 @@ jobs: | |
export SYSDS_QUIET=1 | ||
export LOG4JPROP=$SYSTEMDS_ROOT/src/test/resources/log4j.properties | ||
cd src/main/python | ||
unittest-parallel -t . -s tests -v | ||
unittest-parallel -t . -s tests -v --coverage-branch --coverage-xml .coverage.xml --coverage-source systemds | ||
# python -m unittest discover -s tests -p 'test_*.py' | ||
echo "Exit Status: " $? | ||
- name: Run all python tests no environment | ||
run: | | ||
export LOG4JPROP=$(pwd)/src/test/resources/log4j.properties | ||
cd src/main/python | ||
unittest-parallel -t . -s tests -v | ||
unittest-parallel -t . -s tests -v --coverage-branch --coverage-xml .coverage.xml --coverage-source systemds | ||
# python -m unittest discover -s tests -p 'test_*.py' | ||
echo "Exit Status: " $? | ||
|
@@ -154,3 +154,11 @@ jobs: | |
- name: Check formatting according to Black (src/main/python/tests) | ||
run: | | ||
black --check src/main/python/tests | ||
- name: Upload coverage to Codecov | ||
uses: codecov/[email protected] | ||
if: github.repository_owner == 'apache' | ||
env: | ||
fail_ci_if_error: false | ||
files: src/main/python/.coverage.xml | ||
token: ${{ secrets.CODECOV_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,3 +52,8 @@ systemds/SystemDS.jar | |
|
||
# tutorial | ||
systemds/examples/tutorials/* | ||
|
||
# test coverage | ||
.coverage | ||
.coverage.xml | ||
|