diff options
Diffstat (limited to 'test/asset')
| -rw-r--r-- | test/asset/artifact/minici.yaml | 14 | ||||
| -rw-r--r-- | test/asset/publish/from_dependency.yaml | 84 | ||||
| -rw-r--r-- | test/asset/publish/from_self.yaml | 22 | ||||
| -rw-r--r-- | test/asset/repo/checkout.yaml | 105 | ||||
| -rw-r--r-- | test/asset/run/dependencies.yaml | 62 | ||||
| -rw-r--r-- | test/asset/run/many_repos.yaml | 109 | ||||
| -rw-r--r-- | test/asset/run/norepo-basic.yaml | 11 | ||||
| -rw-r--r-- | test/asset/run/rerun.yaml | 45 |
8 files changed, 449 insertions, 3 deletions
diff --git a/test/asset/artifact/minici.yaml b/test/asset/artifact/minici.yaml index 065ae84..7204bb3 100644 --- a/test/asset/artifact/minici.yaml +++ b/test/asset/artifact/minici.yaml @@ -3,15 +3,23 @@ job generate: shell: - echo "content 1" > f1 - - mkdir subdir - - echo "content 2" > subdir/f2 + - mkdir -p dir/subdir + - echo "content 2" > dir/f2 + - echo "content a" > dir/fa + - echo "content b" > dir/subdir/fb - echo "content 3" > f3 artifact first: path: f1 artifact second: - path: subdir/f2 + path: dir/f2 artifact third: path: f3 + + artifact dir: + path: dir + + artifact sdir: + path: dir/subdir diff --git a/test/asset/publish/from_dependency.yaml b/test/asset/publish/from_dependency.yaml new file mode 100644 index 0000000..6bbfbf8 --- /dev/null +++ b/test/asset/publish/from_dependency.yaml @@ -0,0 +1,84 @@ +destination first: + url: ./first/dest + +destination second: + url: ./second/dest + +destination third: + +destination fourth: + +destination fifth: + + +job gen: + checkout: + + shell: + - mkdir dir + - mkdir dir2 + - mkdir dir2/subdir + - touch x + - touch dir/y + - touch dir2/z2 + - touch dir2/subdir/z + + artifact x: + path: ./x + + artifact y: + path: ./dir/y + + artifact z: + path: ./dir2/subdir/z + + artifact dir: + path: ./dir + + artifact dir2: + path: ./dir2 + + artifact dir2_subdir: + path: ./dir2/subdir + + +job publish: + publish: + - to: first + artifact: gen.x + + - to: first + artifact: gen.y + + - to: second + artifact: gen.z + + - to: third + artifact: gen.dir + + - to: third + artifact: gen.dir2_subdir + + - to: fourth + artifact: gen.x + path: path/for/artifact + + - to: fourth + artifact: gen.x + path: dir/for/artifact/ + + - to: fifth + artifact: gen.dir2_subdir + path: path/for/artifact + + - to: fifth + artifact: gen.dir2_subdir + path: dir/for/artifact/ + + - to: fifth + artifact: gen.dir2 + path: path2/for/artifact + + - to: fifth + artifact: gen.dir2 + path: dir2/for/artifact/ diff --git a/test/asset/publish/from_self.yaml b/test/asset/publish/from_self.yaml new file mode 100644 index 0000000..92d10e9 --- /dev/null +++ b/test/asset/publish/from_self.yaml @@ -0,0 +1,22 @@ +destination dest: + + +job gen_publish: + checkout: + + shell: + - touch x + - touch y + + artifact x: + path: x + + artifact y: + path: y + + publish: + - to: dest + artifact: x + + - to: dest + artifact: gen_publish.y diff --git a/test/asset/repo/checkout.yaml b/test/asset/repo/checkout.yaml new file mode 100644 index 0000000..05e0e99 --- /dev/null +++ b/test/asset/repo/checkout.yaml @@ -0,0 +1,105 @@ +repo r1: +repo r2: +repo r3: + +job checkout_subtree: + checkout: + - repo: r1 + dest: d1 + + - repo: r2 + subtree: s1 + dest: d2_s1 + + shell: + - find \! -name 'list?' -type f > list1 + + artifact out: + path: list1 + + +job checkout_common_root: + checkout: + - repo: r1 + dest: d1 + + - repo: r2 + subtree: s1 + dest: d2_s1 + + - repo: r2 + subtree: s2 + dest: d2_s2 + + shell: + - find \! -name 'list?' -type f > list2 + + artifact out: + path: list2 + + +job checkout_common_subtree: + checkout: + - repo: r3 + subtree: a/b/s1 + dest: d3_s1 + + - repo: r3 + subtree: a/b/c/s2 + dest: d3_s2 + + shell: + - find \! -name 'list?' -type f > list3 + + artifact out: + path: list3 + + +job checkout_common_subtree2: + checkout: + - repo: r1 + dest: d1 + + - repo: r2 + subtree: s1 + dest: d2_s1 + + - repo: r3 + subtree: a/b/c/s2 + dest: d3_s2 + + - repo: r3 + subtree: a/b/c/s3 + dest: d3_s3 + + shell: + - find \! -name 'list?' -type f > list4 + + artifact out: + path: list4 + + +job combined_subtree: + uses: + - checkout_common_root.out + - checkout_common_subtree2.out + + shell: + - find \! -name 'list5' -type f > list5 + + artifact out: + path: list5 + + +job combined_all: + uses: + - checkout_subtree.out + - checkout_common_root.out + - checkout_common_subtree.out + - checkout_common_subtree2.out + + shell: + - find \! -name 'list6' -type f > list6 + + artifact out: + path: list6 diff --git a/test/asset/run/dependencies.yaml b/test/asset/run/dependencies.yaml new file mode 100644 index 0000000..13d5e63 --- /dev/null +++ b/test/asset/run/dependencies.yaml @@ -0,0 +1,62 @@ +repo other: + +job first: + shell: + - touch x + + artifact out: + path: x + + +job second: + uses: + - first.out + + shell: + - mv x y + + artifact out: + path: y + + +job third: + uses: + - first.out + + shell: + - mv x z + + artifact out: + path: z + + +job fourth: + checkout: + - dest: a + - repo: other + dest: b + + uses: + - second.out + + shell: + - mv y w + + artifact out: + path: w + + +job fifth: + uses: + - third.out + - fourth.out + + shell: + - mv z z2 + - mv w w2 + + artifact out1: + path: z2 + + artifact out2: + path: w2 diff --git a/test/asset/run/many_repos.yaml b/test/asset/run/many_repos.yaml new file mode 100644 index 0000000..d861433 --- /dev/null +++ b/test/asset/run/many_repos.yaml @@ -0,0 +1,109 @@ +repo r1: +repo r2: +repo r3: +repo r4: +repo r5: + +destination d1: + +job first: + checkout: + - repo: r1 + dest: d1 + - repo: r4 + dest: d4b + - repo: r3 + dest: d3 + - repo: r2 + dest: d2 + - repo: r4 + dest: d4 + + shell: + - touch some_file + + artifact out: + path: some_file + +job first_manual_revision: + checkout: + - repo: r1 + dest: d1 + - repo: r1 + dest: d1b + revision: tag1 + - repo: r2 + dest: d2b + revision: tag1 + - repo: r4 + dest: d4b + - repo: r3 + dest: d3 + revision: tag1 + - repo: r2 + dest: d2 + - repo: r4 + dest: d4 + + shell: + - touch some_file + + artifact out: + path: some_file + + +job second: + checkout: + - dest: main + - repo: r2 + dest: d2 + - repo: r5 + dest: d5 + - repo: r3 + dest: d3 + + shell: + - touch second_file + + artifact out: + path: second_file + + +job dependent: + uses: + - first.out + + shell: + - mv some_file some_other_file + + artifact out: + path: some_other_file + + +job dependent_publish: + publish: + - to: d1 + artifact: first.out + + +job transitive: + uses: + - dependent.out + + artifact out: + path: some_other_file + + +job combined: + uses: + - first.out + - second.out + + artifact out: + path: second_file + + +job combined_transitive: + uses: + - combined.out + - transitive.out diff --git a/test/asset/run/norepo-basic.yaml b/test/asset/run/norepo-basic.yaml index 2000858..ecd3a97 100644 --- a/test/asset/run/norepo-basic.yaml +++ b/test/asset/run/norepo-basic.yaml @@ -7,3 +7,14 @@ job failure: checkout: null shell: - "false" + +job block_recipe: + checkout: null + shell: | + mkdir dir + cd dir + export VAR='abc' + echo $VAR > var + + artifact out: + path: dir/var diff --git a/test/asset/run/rerun.yaml b/test/asset/run/rerun.yaml new file mode 100644 index 0000000..dc18b41 --- /dev/null +++ b/test/asset/run/rerun.yaml @@ -0,0 +1,45 @@ +job first: + shell: + - touch x + + artifact out: + path: x + + +job second: + uses: + - first.out + + shell: + - mv x y + + artifact out: + path: y + + +job first_fail: + shell: + - "false" + + artifact out: + path: x + + +job second_skip: + uses: + - first_fail.out + + shell: + - "true" + + artifact out: + path: y + + +job third: + uses: + - second.out + - second_skip.out + + shell: + - "true" |