Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: combine and send ci coverage report to PR comment #3957

Closed
wants to merge 9 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 12 additions & 0 deletions .github/workflows/api-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,15 @@ jobs:

- name: Test Vector Stores
run: dev/pytest/pytest_vdb.sh

- name: Coverage Reporting
run: |
coverage report -m
coverage xml -o coverage.xml

- name: Send Coverage Report
if: ${{ matrix.python-version == '3.10'}}
uses: orgoro/coverage@v3.1
with:
coverageFile: coverage.xml
token: ${{ secrets.GITHUB_TOKEN }}
4 changes: 2 additions & 2 deletions api/requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
coverage~=7.2.4
pytest~=8.1.1
coverage~=7.5.0
pytest~=8.2.0
pytest-benchmark~=4.0.0
pytest-env~=1.1.3
pytest-mock~=3.14.0
2 changes: 1 addition & 1 deletion dev/pytest/pytest_model_runtime.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
set -x

pytest api/tests/integration_tests/model_runtime/anthropic \
coverage run -a -m pytest api/tests/integration_tests/model_runtime/anthropic \
api/tests/integration_tests/model_runtime/azure_openai \
api/tests/integration_tests/model_runtime/openai api/tests/integration_tests/model_runtime/chatglm \
api/tests/integration_tests/model_runtime/google api/tests/integration_tests/model_runtime/xinference \
Expand Down
2 changes: 1 addition & 1 deletion dev/pytest/pytest_tools.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
set -x

pytest api/tests/integration_tests/tools/test_all_provider.py
coverage run -a -m pytest api/tests/integration_tests/tools/test_all_provider.py
2 changes: 1 addition & 1 deletion dev/pytest/pytest_unit_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
set -x

# libs
pytest api/tests/unit_tests
coverage run -a -m pytest api/tests/unit_tests
2 changes: 1 addition & 1 deletion dev/pytest/pytest_vdb.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
set -x

pytest api/tests/integration_tests/vdb/
coverage run -a -m pytest api/tests/integration_tests/vdb/
2 changes: 1 addition & 1 deletion dev/pytest/pytest_workflow.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
set -x

pytest api/tests/integration_tests/workflow
coverage run -a -m pytest api/tests/integration_tests/workflow