mirror of
https://github.com/arc53/DocsGPT.git
synced 2025-11-29 08:33:20 +00:00
count coverage
This commit is contained in:
20
.github/workflows/pytest.yml
vendored
20
.github/workflows/pytest.yml
vendored
@@ -3,8 +3,11 @@ name: Run python tests with pytest
|
|||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
pytest_and_coverage:
|
||||||
|
name: Run tests and count coverage
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
pull-requests: write
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
@@ -19,9 +22,18 @@ jobs:
|
|||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip
|
||||||
pip install pytest
|
pip install pytest pytest-cov
|
||||||
cd application
|
cd application
|
||||||
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
|
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
|
||||||
- name: Test with pytest
|
- name: Test with pytest
|
||||||
run: |
|
run: |
|
||||||
python -m pytest
|
python -m pytest --cov=application --cov=scripts --cov=extensions --cov-report xml:/tmp/coverage.xml
|
||||||
|
- name: Coverage
|
||||||
|
if: github.event_name == 'pull_request' && matrix.python-version == '3.11'
|
||||||
|
uses: orgoro/coverage@v3
|
||||||
|
with:
|
||||||
|
coverageFile: /tmp/coverage.xml
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
thresholdAll: 0.1
|
||||||
|
thresholdNew: 0.01
|
||||||
|
thresholdModified: 0.01
|
||||||
|
|||||||
0
extensions/chatwoot/__init__.py
Normal file
0
extensions/chatwoot/__init__.py
Normal file
0
extensions/discord/__init__.py
Normal file
0
extensions/discord/__init__.py
Normal file
0
scripts/__init__.py
Normal file
0
scripts/__init__.py
Normal file
0
scripts/old/__init__.py
Normal file
0
scripts/old/__init__.py
Normal file
0
scripts/parser/file/__init__.py
Normal file
0
scripts/parser/file/__init__.py
Normal file
0
scripts/parser/schema/__init__.py
Normal file
0
scripts/parser/schema/__init__.py
Normal file
Reference in New Issue
Block a user