mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-10-30 03:56:23 -05:00 
			
		
		
		
	Chore: add codecov frontend test results (#9296)
This commit is contained in:
		
							
								
								
									
										31
									
								
								.github/workflows/ci.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										31
									
								
								.github/workflows/ci.yml
									
									
									
									
										vendored
									
									
								
							| @@ -245,6 +245,8 @@ jobs: | |||||||
|         run: cd src-ui && npm run lint |         run: cd src-ui && npm run lint | ||||||
|       - |       - | ||||||
|         name: Run Jest unit tests |         name: Run Jest unit tests | ||||||
|  |         env: | ||||||
|  |           JEST_JUNIT_OUTPUT_FILE: junit-report-${{ matrix.shard-index }}.xml | ||||||
|         run: cd src-ui && npm run test -- --max-workers=2 --shard=${{ matrix.shard-index }}/${{ matrix.shard-count }} |         run: cd src-ui && npm run test -- --max-workers=2 --shard=${{ matrix.shard-index }}/${{ matrix.shard-count }} | ||||||
|       - |       - | ||||||
|         name: Upload Jest coverage |         name: Upload Jest coverage | ||||||
| @@ -257,7 +259,7 @@ jobs: | |||||||
|             src-ui/coverage/lcov.info |             src-ui/coverage/lcov.info | ||||||
|             src-ui/coverage/clover.xml |             src-ui/coverage/clover.xml | ||||||
|           retention-days: 7 |           retention-days: 7 | ||||||
|           if-no-files-found: warn |           if-no-files-found: error | ||||||
|       - |       - | ||||||
|         name: Run Playwright e2e tests |         name: Run Playwright e2e tests | ||||||
|         run: cd src-ui && npx playwright test --shard ${{ matrix.shard-index }}/${{ matrix.shard-count }} |         run: cd src-ui && npx playwright test --shard ${{ matrix.shard-index }}/${{ matrix.shard-count }} | ||||||
| @@ -269,6 +271,16 @@ jobs: | |||||||
|           name: playwright-report-${{ matrix.shard-index }} |           name: playwright-report-${{ matrix.shard-index }} | ||||||
|           path: src-ui/playwright-report |           path: src-ui/playwright-report | ||||||
|           retention-days: 7 |           retention-days: 7 | ||||||
|  |           if-no-files-found: error | ||||||
|  |       - | ||||||
|  |         name: Upload frontend test results | ||||||
|  |         if: always() | ||||||
|  |         uses: actions/upload-artifact@v4 | ||||||
|  |         with: | ||||||
|  |           name: junit-report-${{ matrix.shard-index }} | ||||||
|  |           path: src-ui/junit-report-${{ matrix.shard-index }}.xml | ||||||
|  |           retention-days: 7 | ||||||
|  |           if-no-files-found: error | ||||||
|  |  | ||||||
|   tests-coverage-upload: |   tests-coverage-upload: | ||||||
|     name: "Upload to Codecov" |     name: "Upload to Codecov" | ||||||
| @@ -292,6 +304,13 @@ jobs: | |||||||
|           path: src-ui/coverage/ |           path: src-ui/coverage/ | ||||||
|           pattern: playwright-report-* |           pattern: playwright-report-* | ||||||
|           merge-multiple: true |           merge-multiple: true | ||||||
|  |       - | ||||||
|  |         name: Download frontend test results | ||||||
|  |         uses: actions/download-artifact@v4 | ||||||
|  |         with: | ||||||
|  |           path: src-ui/junit/ | ||||||
|  |           pattern: junit-report-* | ||||||
|  |           merge-multiple: true | ||||||
|       - |       - | ||||||
|         name: Upload frontend coverage to Codecov |         name: Upload frontend coverage to Codecov | ||||||
|         uses: codecov/codecov-action@v5 |         uses: codecov/codecov-action@v5 | ||||||
| @@ -302,6 +321,14 @@ jobs: | |||||||
|           directory: src-ui/coverage/ |           directory: src-ui/coverage/ | ||||||
|           # dont include backend coverage files here |           # dont include backend coverage files here | ||||||
|           files: '!coverage.xml' |           files: '!coverage.xml' | ||||||
|  |       - | ||||||
|  |         name: Upload frontend test results to Codecov | ||||||
|  |         if: ${{ !cancelled() }} | ||||||
|  |         uses: codecov/test-results-action@v1 | ||||||
|  |         with: | ||||||
|  |           token: ${{ secrets.CODECOV_TOKEN }} | ||||||
|  |           flags: frontend | ||||||
|  |           directory: src-ui/junit/ | ||||||
|       - |       - | ||||||
|         name: Download backend coverage |         name: Download backend coverage | ||||||
|         uses: actions/download-artifact@v4 |         uses: actions/download-artifact@v4 | ||||||
| @@ -318,7 +345,7 @@ jobs: | |||||||
|           flags: backend |           flags: backend | ||||||
|           directory: src/ |           directory: src/ | ||||||
|       - |       - | ||||||
|         name: Upload test results to Codecov |         name: Upload backend test results to Codecov | ||||||
|         if: ${{ !cancelled() }} |         if: ${{ !cancelled() }} | ||||||
|         uses: codecov/test-results-action@v1 |         uses: codecov/test-results-action@v1 | ||||||
|         with: |         with: | ||||||
|   | |||||||
							
								
								
									
										1
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							| @@ -44,6 +44,7 @@ nosetests.xml | |||||||
| coverage.xml | coverage.xml | ||||||
| *,cover | *,cover | ||||||
| .pytest_cache | .pytest_cache | ||||||
|  | junit.xml | ||||||
|  |  | ||||||
| # Translations | # Translations | ||||||
| *.mo | *.mo | ||||||
|   | |||||||
| @@ -12,4 +12,13 @@ module.exports = { | |||||||
|     '^src/(.*)': '<rootDir>/src/$1', |     '^src/(.*)': '<rootDir>/src/$1', | ||||||
|   }, |   }, | ||||||
|   workerIdleMemoryLimit: '512MB', |   workerIdleMemoryLimit: '512MB', | ||||||
|  |   reporters: [ | ||||||
|  |     'default', | ||||||
|  |     [ | ||||||
|  |       'jest-junit', | ||||||
|  |       { | ||||||
|  |         classNameTemplate: '{filepath}/{classname}: {title}', | ||||||
|  |       }, | ||||||
|  |     ], | ||||||
|  |   ], | ||||||
| } | } | ||||||
|   | |||||||
							
								
								
									
										34
									
								
								src-ui/package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										34
									
								
								src-ui/package-lock.json
									
									
									
										generated
									
									
									
								
							| @@ -61,6 +61,7 @@ | |||||||
|         "eslint": "^9.21.0", |         "eslint": "^9.21.0", | ||||||
|         "jest": "29.7.0", |         "jest": "29.7.0", | ||||||
|         "jest-environment-jsdom": "^29.7.0", |         "jest-environment-jsdom": "^29.7.0", | ||||||
|  |         "jest-junit": "^16.0.0", | ||||||
|         "jest-preset-angular": "^14.5.3", |         "jest-preset-angular": "^14.5.3", | ||||||
|         "jest-websocket-mock": "^2.5.0", |         "jest-websocket-mock": "^2.5.0", | ||||||
|         "patch-package": "^8.0.0", |         "patch-package": "^8.0.0", | ||||||
| @@ -12418,6 +12419,32 @@ | |||||||
|         "fsevents": "^2.3.2" |         "fsevents": "^2.3.2" | ||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|  |     "node_modules/jest-junit": { | ||||||
|  |       "version": "16.0.0", | ||||||
|  |       "resolved": "https://registry.npmjs.org/jest-junit/-/jest-junit-16.0.0.tgz", | ||||||
|  |       "integrity": "sha512-A94mmw6NfJab4Fg/BlvVOUXzXgF0XIH6EmTgJ5NDPp4xoKq0Kr7sErb+4Xs9nZvu58pJojz5RFGpqnZYJTrRfQ==", | ||||||
|  |       "dev": true, | ||||||
|  |       "license": "Apache-2.0", | ||||||
|  |       "dependencies": { | ||||||
|  |         "mkdirp": "^1.0.4", | ||||||
|  |         "strip-ansi": "^6.0.1", | ||||||
|  |         "uuid": "^8.3.2", | ||||||
|  |         "xml": "^1.0.1" | ||||||
|  |       }, | ||||||
|  |       "engines": { | ||||||
|  |         "node": ">=10.12.0" | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|  |     "node_modules/jest-junit/node_modules/uuid": { | ||||||
|  |       "version": "8.3.2", | ||||||
|  |       "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", | ||||||
|  |       "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", | ||||||
|  |       "dev": true, | ||||||
|  |       "license": "MIT", | ||||||
|  |       "bin": { | ||||||
|  |         "uuid": "dist/bin/uuid" | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|     "node_modules/jest-leak-detector": { |     "node_modules/jest-leak-detector": { | ||||||
|       "version": "29.7.0", |       "version": "29.7.0", | ||||||
|       "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.7.0.tgz", |       "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.7.0.tgz", | ||||||
| @@ -19265,6 +19292,13 @@ | |||||||
|         } |         } | ||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|  |     "node_modules/xml": { | ||||||
|  |       "version": "1.0.1", | ||||||
|  |       "resolved": "https://registry.npmjs.org/xml/-/xml-1.0.1.tgz", | ||||||
|  |       "integrity": "sha512-huCv9IH9Tcf95zuYCsQraZtWnJvBtLVE0QHMOs8bWyZAFZNDcYjsPq1nEx8jKA9y+Beo9v+7OBPRisQTjinQMw==", | ||||||
|  |       "dev": true, | ||||||
|  |       "license": "MIT" | ||||||
|  |     }, | ||||||
|     "node_modules/xml-name-validator": { |     "node_modules/xml-name-validator": { | ||||||
|       "version": "4.0.0", |       "version": "4.0.0", | ||||||
|       "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-4.0.0.tgz", |       "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-4.0.0.tgz", | ||||||
|   | |||||||
| @@ -63,6 +63,7 @@ | |||||||
|     "eslint": "^9.21.0", |     "eslint": "^9.21.0", | ||||||
|     "jest": "29.7.0", |     "jest": "29.7.0", | ||||||
|     "jest-environment-jsdom": "^29.7.0", |     "jest-environment-jsdom": "^29.7.0", | ||||||
|  |     "jest-junit": "^16.0.0", | ||||||
|     "jest-preset-angular": "^14.5.3", |     "jest-preset-angular": "^14.5.3", | ||||||
|     "jest-websocket-mock": "^2.5.0", |     "jest-websocket-mock": "^2.5.0", | ||||||
|     "patch-package": "^8.0.0", |     "patch-package": "^8.0.0", | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 shamoon
					shamoon