diff --git a/.coveragerc b/.coveragerc new file mode 100644 index 000000000..dc1fc53f1 --- /dev/null +++ b/.coveragerc @@ -0,0 +1,35 @@ +[run] + +omit = + *cot* + *iibb* + *nsis* + */padron.py + *pyemail* + *pyfepdf* + *pyi25* + *pyqr* + *rece1* + *receb1* + *recem* + *recet* + *recex1* + *rg3685* + *setup_win* + *sired* + *setup* + *trazafito* + *trazamed* + *trazaprodmed* + *trazarenpre* + *trazavet* + *utils* + *wdigdepfiel* + *ws_sire* + *wscoc* + *wsctg* + *wsfecred* + *wslpg* + *wslpg_datos* + *wsremazucar* + *wsremharina* \ No newline at end of file diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index ba88acf7c..a93e4d282 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -55,3 +55,13 @@ jobs: with: name: report.html path: report.html + + - name: Coverage Report + run: | + pytest --cov-config=.coveragerc --cov-report=html --cov=pyafipws tests/ + - name: Upload coverage report + uses: actions/upload-artifact@v2 + if: ${{ always() }} + with: + name: Coverage_Report + path: htmlcov diff --git a/requirements-dev.txt b/requirements-dev.txt index fef9b5d9f..91970869c 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -2,4 +2,5 @@ pytest==4.6.11; python_version <= '2.7' pytest==6.2.3; python_version > '3' pytest-html==1.22.1; python_version <= '2.7' pytest-html==3.1.1; python_version > '3' -pytest-vcr==1.0.2 \ No newline at end of file +pytest-vcr==1.0.2 +pytest-cov==2.12.1 \ No newline at end of file