Skip to content

Commit

Permalink
Merge pull request #1496 from buildtesters/reorg_examples_script.sche…
Browse files Browse the repository at this point in the history
…ma.json

Reorg examples for script.schema.json
  • Loading branch information
shahzebsiddiqui committed Jun 26, 2023
2 parents 6b6277c + b8f2657 commit 7a01853
Show file tree
Hide file tree
Showing 96 changed files with 595 additions and 1,197 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
buildspecs:
executors_additionalProperties:
type: script
executor: "generic.local.(bash|sh|zsh)"
description: Testing for additional properties in 'executors'
tags: [tutorials]
run: hostname
sbatch: ["-N 4"]
executors:
generic.local.bash:
sbatch: ["-n 4", "-N 1", "-t 30"]
FOO: BAR
generic.local.sh:
sbatch: ["-n 8", "-N 1", "-t 60"]
generic.local.zsh:
sbatch: ["-n 16", "-N 2", "-t 120"]
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
buildspecs:
file_count_additionalProperties_check:
type: script
executor: generic.local.bash
description: Testing for additional properties in file_count
run: hostname
status:
file_count:
- dir: /tmp
count: 0
FOO: BAR
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
buildspecs:
testing_additionalProperties_file_regex:
type: script
executor: generic.local.bash
description: Testing for additional properties in file_regex
run: |
echo "Hello" > hello.txt
status:
file_regex:
- file: hello.txt
exp: '^(Hello)$'
FOO: BAR
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
buildspecs:
invalid_metrics_additional_property:
type: script
executor: generic.local.bash
description: Test for additional property for metrics property
vars:
FOO: BAR
run: echo $FOO
metrics:
foo:
variable: FOO
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
buildspecs:
regex_additionalProperties_test:
type: script
executor: generic.local.bash
description: Testing for additional properties in regex field
run: hostname
status:
regex:
stream: stdout
exp: "world$"
X: 1
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
buildspecs:
additionalProperties_status:
type: script
executor: generic.local.bash
description: test additional properties in status object. This is not allowed
sbatch: ["-n 2", "-q normal", "-t 10"]
run: hostname
status:
slurm_job_state: "COMPLETED"
FOO: BAR
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
buildspecs:
additionalProperties_test:
type: script
executor: generic.local.bash
description: additional properties are not allowed so any invalid key/value pair will result in error
FOO: BAR
run: hostname
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
buildspecs:
invalid_description:
type: script
executor: generic.local.bash
description:
- "Multi Line description"
- "is not accepted"
run: sleep 1
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
buildspecs:
empty_returncode_list:
type: script
executor: generic.local.bash
description: An empty returncode list will cause an error
run: hostname
status:
returncode: []
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
buildspecs:
empty_tags:
type: script
executor: generic.local.bash
description: tag list can't be empty, requires one item.
tags: []
run: hostname
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
buildspecs:
invalid_env_type:
type: script
executor: generic.local.bash
description: env key should be a dictionary
env:
- FOO=BAR
run: echo $FOO
Loading

0 comments on commit 7a01853

Please sign in to comment.