Skip to content

Commit

Permalink
Add test coverage support (#89)
Browse files Browse the repository at this point in the history
  • Loading branch information
caponetto authored Dec 9, 2024
1 parent 56ffd7d commit 37b0487
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 1 deletion.
9 changes: 9 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,11 @@ jobs:
days: 7 # check for newer package versions in past X days
run: |
python3 ./.github/workflows/scripts/fetch_packages_metadata.py $days
- name: Upload coverage reports to Codecov
if: ${{ matrix.python-version == env.PYTHON_VERSION }}
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}

test-ui:
name: Test UI
Expand Down Expand Up @@ -154,6 +159,10 @@ jobs:
run: make install-server
- name: Test
run: make test-ui-unit
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}

test-integration:
name: Run Integration Tests
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ test-dependencies:
@$(PYTHON_PIP) install -q -r test_requirements.txt

pytest:
$(PYTHON) -m pytest -v --durations=0 --durations-min=60 elyra
$(PYTHON) -m pytest -v --durations=0 --durations-min=60 elyra --cov --cov-report=xml

test-server: test-dependencies pytest # Run python unit tests

Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ test = [
"git-python",
"importlib-resources",
"pytest>=5.4.1",
"pytest-cov",
"pytest-console-scripts",
"pytest_jupyter",
"pytest-tornasync",
Expand Down
1 change: 1 addition & 0 deletions test_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ git-python
importlib-resources
PyGithub==1.58.1 # Github actions with Python 3.11 is having newer versions causing test failures
pytest>=5.4.1
pytest-cov
pytest-console-scripts
pytest_jupyter
pytest-tornasync
Expand Down

0 comments on commit 37b0487

Please sign in to comment.