diff --git a/examples/import_phases.yaml b/examples/import_phases.yaml new file mode 100644 index 0000000..c5a73c9 --- /dev/null +++ b/examples/import_phases.yaml @@ -0,0 +1,8 @@ +--- +phases: +- name: main + tasks: + - name: hello + command: + command: echo hello +- import: phases.yaml diff --git a/examples/main_test.go b/examples/main_test.go index 3818d07..26278b9 100644 --- a/examples/main_test.go +++ b/examples/main_test.go @@ -36,6 +36,10 @@ func TestBuildflow(t *testing.T) { title: "command's standard input", file: "stdin.yaml", }, + { + title: "import phases from a file", + file: "import_phases.yaml", + }, { title: "buildflow run fails as expected", file: "fail.yaml", diff --git a/examples/phases.yaml b/examples/phases.yaml new file mode 100644 index 0000000..069506d --- /dev/null +++ b/examples/phases.yaml @@ -0,0 +1,11 @@ +--- +- name: main 2 + tasks: + - name: hello + command: + command: echo "main 2" +- name: main + tasks: + - name: main 3 + command: + command: echo "main 3"