Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Workflow tests, preofficial traits #5051

Merged
merged 17 commits into from
Feb 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
100 changes: 100 additions & 0 deletions test/cypress/executor-tests/crd-workflow/smoke.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
apiVersion: workflows.testkube.io/v1beta1
kind: Workflow
metadata:
name: cypress-workflow-smoke-13
labels:
core-tests: workflows
spec:
content:
git:
uri: https://github.com/kubeshop/testkube
revision: main
paths:
- test/cypress/executor-tests/cypress-13
resources:
requests:
cpu: 2
memory: 2Gi
workingDir: /data/repo/test/cypress/executor-tests/cypress-13
steps:
- name: Run tests
run:
image: cypress/included:13.6.4
args:
- --env
- NON_CYPRESS_ENV=NON_CYPRESS_ENV_value
- --config
- '{"screenshotsFolder":"/data/artifacts/screenshots","videosFolder":"/data/artifacts/videos"}'
env:
- name: CYPRESS_CUSTOM_ENV
value: CYPRESS_CUSTOM_ENV_value
- name: Saving artifacts
workingDir: /data/artifacts
artifacts:
paths:
- '*'
---
apiVersion: workflows.testkube.io/v1beta1
kind: Workflow
metadata:
name: cypress-workflow-smoke-13-negative
labels:
core-tests: workflows
spec:
content:
git:
uri: https://github.com/kubeshop/testkube
revision: main
paths:
- test/cypress/executor-tests/cypress-13
resources:
requests:
cpu: 2
memory: 2Gi
workingDir: /data/repo/test/cypress/executor-tests/cypress-13
steps:
- name: Run tests
run:
image: cypress/included:13.6.4
args:
- --env
- NON_CYPRESS_ENV=NON_CYPRESS_ENV_value
- --config
- '{"screenshotsFolder":"/data/artifacts/screenshots","videosFolder":"/data/artifacts/videos"}'
negative: true
- name: Saving artifacts
workingDir: /data/artifacts
artifacts:
paths:
- '**/*'
---
apiVersion: workflows.testkube.io/v1beta1
kind: Workflow
metadata:
name: cypress-workflow-smoke-13-preofficial-trait
labels:
core-tests: workflows
spec:
resources:
requests:
cpu: 2
memory: 2Gi
workingDir: /data/repo/test/cypress/executor-tests/cypress-13
env:
- name: CYPRESS_CUSTOM_ENV # currently only possible on this level
value: "CYPRESS_CUSTOM_ENV_value"
steps:
- name: Checkout
checkout:
git:
uri: https://github.com/kubeshop/testkube
revision: main
paths:
- test/cypress/executor-tests/cypress-13
- name: Run from trait
workingDir: /data/repo/test/cypress/executor-tests/cypress-13
trait:
name: pre-official/cypress
config:
version: 13.5.0
params: "--env NON_CYPRESS_ENV=NON_CYPRESS_ENV_value --config '{\"screenshotsFolder\":\"/data/artifacts/screenshots\",\"videosFolder\":\"/data/artifacts/videos\"}'"
55 changes: 55 additions & 0 deletions test/gradle/executor-smoke/crd-workflow/smoke.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
apiVersion: workflows.testkube.io/v1beta1
kind: Workflow
metadata:
name: gradle-workflow-smoke-jdk11
labels:
core-tests: workflows
spec:
content:
git:
uri: https://github.com/kubeshop/testkube
revision: main
paths:
- contrib/executor/gradle/examples/hello-gradle
resources:
requests:
cpu: 512m
memory: 512Mi
workingDir: /data/repo/contrib/executor/gradle/examples/hello-gradle
steps:
- name: Run tests
run:
image: gradle:8.5.0-jdk11
command:
- gradle
- --no-daemon
- test
env:
- name: TESTKUBE_GRADLE
value: "true"
---
apiVersion: workflows.testkube.io/v1beta1
kind: Workflow
metadata:
name: gradle-workflow-smoke-jdk11-default-command # TODO: recheck if it's fixed - the step passes without being executed
labels:
core-tests: workflows
spec:
content:
git:
uri: https://github.com/kubeshop/testkube
revision: main
paths:
- contrib/executor/gradle/examples/hello-gradle
resources:
requests:
cpu: 512m
memory: 512Mi
workingDir: /data/repo/contrib/executor/gradle/examples/hello-gradle
steps:
- name: Run tests
run:
image: gradle:8.5.0-jdk11
env:
- name: TESTKUBE_GRADLE
value: "true"
28 changes: 28 additions & 0 deletions test/jmeter/executor-tests/crd-workflow/smoke.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
apiVersion: workflows.testkube.io/v1beta1
kind: Workflow
metadata:
name: jmeter-workflow-smoke
labels:
core-tests: workflows
spec:
content:
git:
uri: https://github.com/kubeshop/testkube
revision: main
paths:
- test/jmeter/executor-tests/jmeter-executor-smoke.jmx
resources:
requests:
cpu: 512m
memory: 512Mi
workingDir: /data/repo/test/jmeter/executor-tests
steps:
- name: Run tests
run:
image: justb4/jmeter:5.5
command:
- jmeter
args:
- -n
- -t
- jmeter-executor-smoke.jmx
91 changes: 91 additions & 0 deletions test/k6/executor-tests/crd-workflow/smoke.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
apiVersion: workflows.testkube.io/v1beta1
kind: Workflow
metadata:
name: k6-workflow-smoke
labels:
core-tests: workflows
spec:
content:
git:
uri: https://github.com/kubeshop/testkube
revision: main
paths:
- test/k6/executor-tests/k6-smoke-test.js
resources:
requests:
cpu: 128m
memory: 128Mi
workingDir: /data/repo/test/k6/executor-tests
steps:
- name: Run test
run:
image: grafana/k6:0.43.1
args:
- run
- k6-smoke-test.js
- -e
- K6_ENV_FROM_PARAM=K6_ENV_FROM_PARAM_value
env:
- name: K6_SYSTEM_ENV
value: K6_SYSTEM_ENV_value
---
apiVersion: workflows.testkube.io/v1beta1
kind: Workflow
metadata:
name: k6-workflow-smoke-preofficial-trait
labels:
core-tests: workflows
spec:
resources:
requests:
cpu: 128m
memory: 128Mi
workingDir: /data/repo/test/k6/executor-tests
env:
- name: K6_SYSTEM_ENV # currently only possible on this level
value: K6_SYSTEM_ENV_value
steps:
- name: Checkout
checkout:
git:
uri: https://github.com/kubeshop/testkube
revision: main
paths:
- test/k6/executor-tests/k6-smoke-test.js
- name: Run from trait
workingDir: /data/repo/test/k6/executor-tests
trait:
name: pre-official/k6
config:
version: 0.48.0
params: "k6-smoke-test.js -e K6_ENV_FROM_PARAM=K6_ENV_FROM_PARAM_value"
---
apiVersion: workflows.testkube.io/v1beta1
kind: Workflow
metadata:
name: k6-workflow-smoke-preofficial-trait-without-checkout-step
labels:
core-tests: workflows
spec:
content:
git:
uri: https://github.com/kubeshop/testkube
revision: main
paths:
- test/k6/executor-tests/k6-smoke-test.js
resources:
requests:
cpu: 128m
memory: 128Mi
workingDir: /data/repo/test/k6/executor-tests
env:
- name: K6_SYSTEM_ENV # currently only possible on this level
value: K6_SYSTEM_ENV_value
steps:
- name: Run from trait
workingDir: /data/repo/test/k6/executor-tests
trait:
name: pre-official/k6
config:
version: 0.48.0
params: "k6-smoke-test.js -e K6_ENV_FROM_PARAM=K6_ENV_FROM_PARAM_value"
28 changes: 28 additions & 0 deletions test/maven/executor-smoke/crd-workflow/smoke.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
apiVersion: workflows.testkube.io/v1beta1
kind: Workflow
metadata:
name: maven-workflow-smoke-jdk11
labels:
core-tests: workflows
spec:
content:
git:
uri: https://github.com/kubeshop/testkube
revision: main
paths:
- contrib/executor/maven/examples/hello-maven
resources:
requests:
cpu: 256m
memory: 256Mi
workingDir: /data/repo/contrib/executor/maven/examples/hello-maven
steps:
- name: Run tests
run:
image: maven:3.9.6-eclipse-temurin-11-focal
command:
- "mvn"
- "test"
env:
- name: TESTKUBE_MAVEN
value: "true"
70 changes: 70 additions & 0 deletions test/playwright/executor-tests/crd-workflow/smoke.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
apiVersion: workflows.testkube.io/v1beta1
kind: Workflow
metadata:
name: playwright-workflow-smoke-v1.32.3
labels:
core-tests: workflows
spec:
content:
git:
uri: https://github.com/kubeshop/testkube
revision: main
paths:
- test/playwright/executor-tests/playwright-project
resources:
requests:
cpu: 2
memory: 2Gi
workingDir: /data/repo/test/playwright/executor-tests/playwright-project
steps:
- name: Install dependencies
run:
image: mcr.microsoft.com/playwright:v1.32.3-focal
command:
- npm
args:
- ci
- name: Run tests
run:
image: mcr.microsoft.com/playwright:v1.32.3-focal
command:
- "npx"
args:
- "--yes"
- "[email protected]"
- "test"
- "--output"
- "/data/artifacts"
- name: Save artifacts
workingDir: /data/artifacts
artifacts:
paths:
- '*'
---
apiVersion: workflows.testkube.io/v1beta1
kind: Workflow
metadata:
name: playwright-workflow-smoke-official-trait
labels:
core-tests: workflows
spec:
resources:
requests:
cpu: 2
memory: 2Gi
workingDir: /data/repo/test/playwright/executor-tests/playwright-project
steps:
- name: Checkout
checkout:
git:
uri: https://github.com/kubeshop/testkube
revision: main
paths:
- test/playwright/executor-tests/playwright-project
- name: Run from trait
workingDir: /data/repo/test/playwright/executor-tests/playwright-project
trait:
name: official/playwright
config:
# params: --workers 4
tag: v1.32.3-jammy
Loading
Loading