From bb330fc1f6499c748edf9b3d420814d632251ebd Mon Sep 17 00:00:00 2001 From: Tomasz Konieczny Date: Mon, 22 May 2023 00:11:39 +0200 Subject: [PATCH] feat: Custom container executor for Playwright - artifacts (#3867) * Playwright project - lock file aligned * Playwright project - lock file aligned * playwright artifacts tests * custom container executor - playwright - artifacts --- .../executor-smoke/crd/playwright.yaml | 8 +++++++- .../executors/container-executor-playwright.yaml | 10 +++++++--- .../playwright-project/package-lock.json | 16 ++++++++-------- .../playwright-project/package.json | 2 +- 4 files changed, 23 insertions(+), 13 deletions(-) diff --git a/test/container-executor/executor-smoke/crd/playwright.yaml b/test/container-executor/executor-smoke/crd/playwright.yaml index 9050ea7daec..0250b7bcc78 100644 --- a/test/container-executor/executor-smoke/crd/playwright.yaml +++ b/test/container-executor/executor-smoke/crd/playwright.yaml @@ -14,4 +14,10 @@ spec: uri: https://github.com/kubeshop/testkube branch: main path: test/playwright/executor-tests/playwright-project - workingDir: test/playwright/executor-tests/playwright-project \ No newline at end of file + workingDir: test/playwright/executor-tests/playwright-project + executionRequest: + artifactRequest: + storageClassName: standard + volumeMountPath: /data/artifacts + dirs: + - ./ \ No newline at end of file diff --git a/test/executors/container-executor-playwright.yaml b/test/executors/container-executor-playwright.yaml index 3268eebdab4..a805ffde531 100644 --- a/test/executors/container-executor-playwright.yaml +++ b/test/executors/container-executor-playwright.yaml @@ -7,10 +7,12 @@ spec: image: mcr.microsoft.com/playwright:v1.32.3-focal command: ["/bin/sh", "-c"] args: - - "npm install && CI=1 npx playwright test" + - "npm ci && CI=1 npx playwright test --output /data/artifacts" executor_type: container types: - container-executor-playwright-v1.32.3/test + features: + - artifacts --- apiVersion: executor.testkube.io/v1 kind: Executor @@ -21,7 +23,9 @@ spec: image: mcr.microsoft.com/playwright:v1.31.1-focal command: ["/bin/sh", "-c"] args: - - "npm install; npx playwright test" + - "npm ci; npx playwright test --output /data/artifacts" executor_type: container types: - - container-executor-playwright-v1.31.1/test \ No newline at end of file + - container-executor-playwright-v1.31.1/test + features: + - artifacts \ No newline at end of file diff --git a/test/playwright/executor-tests/playwright-project/package-lock.json b/test/playwright/executor-tests/playwright-project/package-lock.json index 2806fe624a5..95218ce5fa0 100644 --- a/test/playwright/executor-tests/playwright-project/package-lock.json +++ b/test/playwright/executor-tests/playwright-project/package-lock.json @@ -9,17 +9,17 @@ "version": "1.0.0", "license": "ISC", "devDependencies": { - "@playwright/test": "^1.31.1" + "@playwright/test": "1.32.3" } }, "node_modules/@playwright/test": { - "version": "1.31.1", - "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.31.1.tgz", - "integrity": "sha512-IsytVZ+0QLDh1Hj83XatGp/GsI1CDJWbyDaBGbainsh0p2zC7F4toUocqowmjS6sQff2NGT3D9WbDj/3K2CJiA==", + "version": "1.32.3", + "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.32.3.tgz", + "integrity": "sha512-BvWNvK0RfBriindxhLVabi8BRe3X0J9EVjKlcmhxjg4giWBD/xleLcg2dz7Tx0agu28rczjNIPQWznwzDwVsZQ==", "dev": true, "dependencies": { "@types/node": "*", - "playwright-core": "1.31.1" + "playwright-core": "1.32.3" }, "bin": { "playwright": "cli.js" @@ -52,9 +52,9 @@ } }, "node_modules/playwright-core": { - "version": "1.31.1", - "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.31.1.tgz", - "integrity": "sha512-JTyX4kV3/LXsvpHkLzL2I36aCdml4zeE35x+G5aPc4bkLsiRiQshU5lWeVpHFAuC8xAcbI6FDcw/8z3q2xtJSQ==", + "version": "1.32.3", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.32.3.tgz", + "integrity": "sha512-SB+cdrnu74ZIn5Ogh/8278ngEh9NEEV0vR4sJFmK04h2iZpybfbqBY0bX6+BLYWVdV12JLLI+JEFtSnYgR+mWg==", "dev": true, "bin": { "playwright": "cli.js" diff --git a/test/playwright/executor-tests/playwright-project/package.json b/test/playwright/executor-tests/playwright-project/package.json index 19cb71c28b0..073a62b10a6 100644 --- a/test/playwright/executor-tests/playwright-project/package.json +++ b/test/playwright/executor-tests/playwright-project/package.json @@ -8,6 +8,6 @@ "author": "", "license": "ISC", "devDependencies": { - "@playwright/test": "^1.32.3" + "@playwright/test": "1.32.3" } }