mirror of
https://github.com/arc53/DocsGPT
synced 2024-11-19 21:25:39 +00:00
Merge pull request #308 from larinam/revert-pytest-introduction
revert introduction of the coverage note addition to pull requests as…
This commit is contained in:
commit
b3e5f09e3b
17
.github/workflows/pytest.yml
vendored
17
.github/workflows/pytest.yml
vendored
@ -1,18 +1,12 @@
|
|||||||
name: Run python tests with pytest
|
name: Run python tests with pytest
|
||||||
|
|
||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
pytest_and_coverage:
|
pytest_and_coverage:
|
||||||
name: Run tests and count 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:
|
||||||
python-version: ["3.9", "3.10", "3.11"]
|
python-version: ["3.9", "3.10", "3.11"]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: Set up Python ${{ matrix.python-version }}
|
- name: Set up Python ${{ matrix.python-version }}
|
||||||
@ -25,15 +19,6 @@ jobs:
|
|||||||
pip install pytest pytest-cov
|
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 and generate coverage report
|
||||||
run: |
|
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:/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
|
|
||||||
|
Loading…
Reference in New Issue
Block a user