Skip to content

Commit

Permalink
Add unit_test_codecov make target
Browse files Browse the repository at this point in the history
Signed-off-by: Eduardo Apolinario <eapolinario@users.noreply.github.com>
  • Loading branch information
eapolinario committed Dec 8, 2022
1 parent a025d07 commit 6885010
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pythonbuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
pip freeze
- name: Test with coverage
run: |
pytest tests/flytekit/unit -m "not sandbox_test" --cov=./ --cov-report=xml
make unit_test_codecov
- name: Codecov
uses: codecov/codecov-action@v3.1.0
with:
Expand Down
9 changes: 7 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,17 @@ spellcheck: ## Runs a spellchecker over all code and documentation
.PHONY: test
test: lint unit_test

.PHONY: unit_test_codecov
unit_test_codecov:
$(MAKE) CODECOV_OPTS="--cov=./ --cov-report=xml" unit_test

.PHONY: unit_test
unit_test:
# Skip tensorflow tests and run them with the necessary env var set so that a working (albeit slower)
# library is used to serialize/deserialize protobufs is used.
pytest -m "not sandbox_test" tests/flytekit/unit/ --ignore=tests/flytekit/unit/extras/tensorflow && \
PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python pytest tests/flytekit/unit/extras/tensorflow
CODECOV_OPTS=${CODECOV_OPTS:-""}
pytest -m "not sandbox_test" tests/flytekit/unit/deck/ --ignore=tests/flytekit/unit/extras/tensorflow ${CODECOV_OPTS} && \
PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python pytest tests/flytekit/unit/extras/tensorflow ${CODECOV_OPTS}

requirements-spark2.txt: export CUSTOM_COMPILE_COMMAND := make requirements-spark2.txt
requirements-spark2.txt: requirements-spark2.in install-piptools
Expand Down

0 comments on commit 6885010

Please sign in to comment.