Skip to content

Commit

Permalink
Insert test coverage check for python client into github pipeline (fe…
Browse files Browse the repository at this point in the history
…athr-ai#862)

* Insert test coverage check for python client into github pipeline
  • Loading branch information
enya-yx authored Nov 21, 2022
1 parent 5d565a9 commit 32d9333
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 4 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/.coveragerc_db
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[run]
omit = feathr_project/feathr/registry/_feature_registry_purview.py
feathr_project/feathr/spark_provider/_synapse_submission.py
feathr_project/feathr/spark_provider/_localspark_submission.py
[report]
exclude_lines =
pragma: no cover
@abstract
8 changes: 8 additions & 0 deletions .github/workflows/.coveragerc_local
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[run]
omit = feathr_project/feathr/registry/_feature_registry_purview.py
feathr_project/feathr/spark_provider/_databricks_submission.py
feathr_project/feathr/spark_provider/_synapse_submission.py
[report]
exclude_lines =
pragma: no cover
@abstract
8 changes: 8 additions & 0 deletions .github/workflows/.coveragerc_sy
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[run]
omit = feathr_project/feathr/registry/_feature_registry_purview.py
feathr_project/feathr/spark_provider/_databricks_submission.py
feathr_project/feathr/spark_provider/_localspark_submission.py
[report]
exclude_lines =
pragma: no cover
@abstract
7 changes: 3 additions & 4 deletions .github/workflows/pull_request_push_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,7 @@ jobs:
SQL1_PASSWORD: ${{secrets.SQL1_PASSWORD}}
run: |
# run only test with databricks. run in 4 parallel jobs
pytest -n 6 feathr_project/test/
pytest -n 6 --cov-report term-missing --cov=feathr_project/feathr feathr_project/test --cov-config=.github/workflows/.coveragerc_db
azure_synapse_test:
# might be a bit duplication to setup both the azure_synapse test and databricks test, but for now we will keep those to accelerate the test speed
runs-on: ubuntu-latest
Expand Down Expand Up @@ -197,7 +196,7 @@ jobs:
run: |
# skip databricks related test as we just ran the test; also seperate databricks and synapse test to make sure there's no write conflict
# run in 4 parallel jobs to make the time shorter
pytest -n 6 feathr_project/test/
pytest -n 6 --cov-report term-missing --cov=feathr_project/feathr feathr_project/test --cov-config=.github/workflows/.coveragerc_sy
local_spark_test:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -255,7 +254,7 @@ jobs:
SQL1_PASSWORD: ${{secrets.SQL1_PASSWORD}}
run: |
# skip cloud related tests
pytest feathr_project/test/test_local_spark_e2e.py
pytest --cov-report term-missing --cov=feathr_project/feathr/spark_provider feathr_project/test/test_local_spark_e2e.py --cov-config=.github/workflows/.coveragerc_local
failure_notification:
# If any failure, warning message will be sent
Expand Down
1 change: 1 addition & 0 deletions feathr_project/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"black>=22.1.0", # formatter
"isort", # sort import statements
"pytest>=7",
"pytest-cov",
"pytest-xdist",
"pytest-mock>=3.8.1",
],
Expand Down

0 comments on commit 32d9333

Please sign in to comment.