Merge pull request #320 from larinam/test-codecov

add simple test to make a PR to check CodeCov
This commit is contained in:
Alex
2023-09-04 18:38:46 +01:00
committed by GitHub
2 changed files with 7 additions and 2 deletions

View File

@@ -21,8 +21,9 @@ jobs:
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Test with pytest and generate coverage report
run: |
python -m pytest --cov=application --cov=scripts --cov=extensions --cov-report xml:/tmp/coverage.xml
python -m pytest --cov=application --cov=scripts --cov=extensions --cov-report=xml
- name: Upload coverage reports to Codecov
if: github.event_name == 'pull_request' && matrix.python-version == '3.11'
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

View File

@@ -1,4 +1,4 @@
from application.app import get_vectorstore
from application.app import get_vectorstore, is_azure_configured
import os
@@ -26,3 +26,7 @@ def test_default_active_docs():
def test_complex_active_docs():
data = {"active_docs": "local/other/path"}
assert get_vectorstore(data) == os.path.join("application", "indexes/local/other/path")
def test_is_azure_configured():
assert not is_azure_configured()