mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-10-30 03:56:23 -05:00 
			
		
		
		
	Development: always try playwright install on ci, cache browsers (#9847)
This commit is contained in:
		
							
								
								
									
										22
									
								
								.github/workflows/ci.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										22
									
								
								.github/workflows/ci.yml
									
									
									
									
										vendored
									
									
								
							| @@ -177,12 +177,19 @@ jobs: | |||||||
|             ~/.pnpm-store |             ~/.pnpm-store | ||||||
|             ~/.cache |             ~/.cache | ||||||
|           key: ${{ runner.os }}-frontenddeps-${{ hashFiles('src-ui/pnpm-lock.yaml') }} |           key: ${{ runner.os }}-frontenddeps-${{ hashFiles('src-ui/pnpm-lock.yaml') }} | ||||||
|  |       - name: Cache Playwright browsers | ||||||
|  |         uses: actions/cache@v4 | ||||||
|  |         with: | ||||||
|  |           path: ~/.cache/ms-playwright | ||||||
|  |           key: ${{ runner.os }}-playwright-${{ hashFiles('src-ui/pnpm-lock.yaml') }} | ||||||
|  |           restore-keys: | | ||||||
|  |             ${{ runner.os }}-playwright- | ||||||
|  |       - name: Install Playwright system dependencies | ||||||
|  |         run: npx playwright install-deps | ||||||
|       - name: Install dependencies |       - name: Install dependencies | ||||||
|         if: steps.cache-frontend-deps.outputs.cache-hit != 'true' |  | ||||||
|         run: cd src-ui && pnpm install |         run: cd src-ui && pnpm install | ||||||
|       - name: Install Playwright |       - name: Install Playwright and Browsers | ||||||
|         if: steps.cache-frontend-deps.outputs.cache-hit != 'true' |         run: cd src-ui && pnpm exec playwright install | ||||||
|         run: cd src-ui && pnpm playwright install --with-deps |  | ||||||
|   tests-frontend: |   tests-frontend: | ||||||
|     name: "Frontend Tests (Node ${{ matrix.node-version }} - ${{ matrix.shard-index }}/${{ matrix.shard-count }})" |     name: "Frontend Tests (Node ${{ matrix.node-version }} - ${{ matrix.shard-index }}/${{ matrix.shard-count }})" | ||||||
|     runs-on: ubuntu-24.04 |     runs-on: ubuntu-24.04 | ||||||
| @@ -220,6 +227,13 @@ jobs: | |||||||
|         run: cd src-ui && pnpm run lint |         run: cd src-ui && pnpm run lint | ||||||
|       - name: Run Jest unit tests |       - name: Run Jest unit tests | ||||||
|         run: cd src-ui && pnpm run test --max-workers=2 --shard=${{ matrix.shard-index }}/${{ matrix.shard-count }} |         run: cd src-ui && pnpm run test --max-workers=2 --shard=${{ matrix.shard-index }}/${{ matrix.shard-count }} | ||||||
|  |       - name: Cache Playwright browsers | ||||||
|  |         uses: actions/cache@v4 | ||||||
|  |         with: | ||||||
|  |           path: ~/.cache/ms-playwright | ||||||
|  |           key: ${{ runner.os }}-playwright-${{ hashFiles('src-ui/pnpm-lock.yaml') }} | ||||||
|  |           restore-keys: | | ||||||
|  |             ${{ runner.os }}-playwright- | ||||||
|       - name: Run Playwright e2e tests |       - name: Run Playwright e2e tests | ||||||
|         run: cd src-ui && pnpm exec playwright test --shard ${{ matrix.shard-index }}/${{ matrix.shard-count }} |         run: cd src-ui && pnpm exec playwright test --shard ${{ matrix.shard-index }}/${{ matrix.shard-count }} | ||||||
|       - name: Upload frontend test results to Codecov |       - name: Upload frontend test results to Codecov | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 shamoon
					shamoon