Skip to content

Commit f263108

Browse files
Optimized COPY . . cases (OWASP#1287)
* copying only required files * pre-commit * clean up * Update code --------- Co-authored-by: Arkadii Yakovets <arkadii.yakovets@owasp.org>
1 parent de1503f commit f263108

3 files changed

Lines changed: 18 additions & 3 deletions

File tree

frontend/docker/Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@ COPY --chmod=444 package.json pnpm-lock.yaml ./
66
RUN npm install --ignore-scripts -g pnpm && \
77
pnpm install --ignore-scripts
88

9-
COPY . .
9+
COPY components.json tailwind.config.js tsconfig.json vite.config.ts ./
10+
COPY index.html index.html
11+
COPY public public
12+
COPY src src
1013

1114
RUN pnpm run build
1215

frontend/docker/Dockerfile.e2e.test

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,9 @@ COPY --chmod=444 package.json pnpm-lock.yaml ./
88
RUN npm install --ignore-scripts -g pnpm && \
99
pnpm install --ignore-scripts
1010

11-
COPY . .
11+
COPY __tests__/e2e __tests__/e2e
12+
COPY __tests__/unit/data __tests__/unit/data
13+
COPY index.html index.html
14+
COPY playwright.config.ts playwright.config.ts
15+
COPY src src
16+
COPY tailwind.config.js tsconfig.json vite.config.ts ./

frontend/playwright.config.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { defineConfig } from '@playwright/test'
1+
import { defineConfig, devices } from '@playwright/test'
22

33
export default defineConfig({
44
fullyParallel: true,
@@ -7,8 +7,15 @@ export default defineConfig({
77
name: 'Chromium',
88
use: { browserName: 'chromium' },
99
},
10+
{
11+
name: 'Mobile Safari - iPhone 13',
12+
use: {
13+
...devices['iPhone 13'],
14+
},
15+
},
1016
],
1117
reporter: [['list', { printSteps: true }]],
18+
retries: 2,
1219
testDir: './__tests__/e2e',
1320
use: {
1421
baseURL: 'http://localhost:3000',

0 commit comments

Comments
 (0)