mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-10-30 03:56:23 -05:00 
			
		
		
		
	Switches to Codecov for coverage reporting and status
This commit is contained in:
		
							
								
								
									
										19
									
								
								.codecov.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								.codecov.yml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,19 @@ | |||||||
|  | # https://docs.codecov.com/docs/pull-request-comments | ||||||
|  | # codecov will only comment if coverage changes | ||||||
|  | comment: | ||||||
|  |   require_changes: true | ||||||
|  | coverage: | ||||||
|  |   status: | ||||||
|  |     project: | ||||||
|  |       default: | ||||||
|  |         # https://docs.codecov.com/docs/commit-status#threshold | ||||||
|  |         threshold: 1% | ||||||
|  |         # https://docs.codecov.com/docs/commit-status#only_pulls | ||||||
|  |         only_pulls: true | ||||||
|  |     patch: | ||||||
|  |       default: | ||||||
|  |         # For the changed lines only, target 75% covered, but | ||||||
|  |         # allow as low as 50% | ||||||
|  |         target: 75% | ||||||
|  |         threshold: 25% | ||||||
|  |         only_pulls: true | ||||||
							
								
								
									
										29
									
								
								.github/workflows/ci.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										29
									
								
								.github/workflows/ci.yml
									
									
									
									
										vendored
									
									
								
							| @@ -119,8 +119,6 @@ jobs: | |||||||
|       - |       - | ||||||
|         name: Checkout |         name: Checkout | ||||||
|         uses: actions/checkout@v3 |         uses: actions/checkout@v3 | ||||||
|         with: |  | ||||||
|           fetch-depth: 0 |  | ||||||
|       - |       - | ||||||
|         name: Start containers |         name: Start containers | ||||||
|         run: | |         run: | | ||||||
| @@ -162,27 +160,14 @@ jobs: | |||||||
|           cd src/ |           cd src/ | ||||||
|           pipenv --python ${{ steps.setup-python.outputs.python-version }} run pytest -ra |           pipenv --python ${{ steps.setup-python.outputs.python-version }} run pytest -ra | ||||||
|       - |       - | ||||||
|         name: Get changed files |         name: Upload coverage to Codecov | ||||||
|         id: changed-files-specific |         if: matrix.python-version == ${{ env.DEFAULT_PYTHON_VERSION }} | ||||||
|         uses: tj-actions/changed-files@v35 |         uses: codecov/codecov-action@v3 | ||||||
|         with: |         with: | ||||||
|           files: | |           # not required for public repos, but intermittently fails otherwise | ||||||
|             src/** |           token: ${{ secrets.CODECOV_TOKEN }} | ||||||
|       - |           # future expansion | ||||||
|         name: List all changed files |           flags: backend | ||||||
|         run: | |  | ||||||
|           for file in ${{ steps.changed-files-specific.outputs.all_changed_files }}; do |  | ||||||
|             echo "${file} was changed" |  | ||||||
|           done |  | ||||||
|       - |  | ||||||
|         name: Publish coverage results |  | ||||||
|         if: matrix.python-version == ${{ env.DEFAULT_PYTHON_VERSION }} && steps.changed-files-specific.outputs.any_changed == 'true' |  | ||||||
|         env: |  | ||||||
|           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |  | ||||||
|         # https://github.com/coveralls-clients/coveralls-python/issues/251 |  | ||||||
|         run: | |  | ||||||
|           cd src/ |  | ||||||
|           pipenv --python ${{ steps.setup-python.outputs.python-version }} run coveralls --service=github |  | ||||||
|       - |       - | ||||||
|         name: Stop containers |         name: Stop containers | ||||||
|         if: always() |         if: always() | ||||||
|   | |||||||
| @@ -1,7 +1,7 @@ | |||||||
| [](https://github.com/paperless-ngx/paperless-ngx/actions) | [](https://github.com/paperless-ngx/paperless-ngx/actions) | ||||||
| [](https://crowdin.com/project/paperless-ngx) | [](https://crowdin.com/project/paperless-ngx) | ||||||
| [](https://docs.paperless-ngx.com) | [](https://docs.paperless-ngx.com) | ||||||
| [](https://coveralls.io/github/paperless-ngx/paperless-ngx?branch=master) | [](https://codecov.io/gh/paperless-ngx/paperless-ngx) | ||||||
| [](https://matrix.to/#/%23paperlessngx%3Amatrix.org) | [](https://matrix.to/#/%23paperlessngx%3Amatrix.org) | ||||||
| [](https://demo.paperless-ngx.com) | [](https://demo.paperless-ngx.com) | ||||||
|  |  | ||||||
|   | |||||||
| @@ -7,7 +7,7 @@ max-line-length = 88 | |||||||
|  |  | ||||||
| [tool:pytest] | [tool:pytest] | ||||||
| DJANGO_SETTINGS_MODULE=paperless.settings | DJANGO_SETTINGS_MODULE=paperless.settings | ||||||
| addopts = --pythonwarnings=all --cov --cov-report=html --numprocesses auto --quiet | addopts = --pythonwarnings=all --cov --cov-report=html --cov-report=xml --numprocesses auto --quiet | ||||||
| env = | env = | ||||||
|   PAPERLESS_DISABLE_DBHANDLER=true |   PAPERLESS_DISABLE_DBHANDLER=true | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Trenton H
					Trenton H