Skip to content

Commit

Permalink
docs: adds more examples
Browse files Browse the repository at this point in the history
  • Loading branch information
cristianoliveira committed May 22, 2023
1 parent 6ca71d8 commit 0ba9fac
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 7 deletions.
4 changes: 4 additions & 0 deletions examples/list-of-commands-per-task.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- name: run a list of commands
run: ["echo first", "echo second", "echo complex | sed s/complex/third/g"]
change: "src/**"
run_on_init: true
5 changes: 5 additions & 0 deletions examples/list-of-watches.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
- name: run a list of watches
run: "echo complex | sed s/complex/third/g"
change: ["src/**", "tests/**"]
ignore: ["tests/integration/**"]
run_on_init: true
4 changes: 3 additions & 1 deletion examples/multiple.yml → examples/multiple-tasks.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
- name: run my test
run: "echo 'tests'"
change: "**"
ignore: ["tests/**", "src/**"]
run_on_init: true

- name: run my build
run: "echo 'build'"
change: "**"
change: ["src/**"]
ignore: ["tests/**", "src/**/*.specs"]

- name: run my lint
run: "echo 'lint'"
Expand Down
4 changes: 0 additions & 4 deletions examples/piped.yml

This file was deleted.

4 changes: 2 additions & 2 deletions tests/integration/specs/list-of-commands-task-test.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
source "$HELPERS"

test "it a list of commands for the same task (on init)"
test "it allows a list of commands for the same task (on init)"

echo "
- name: run complex command
Expand Down Expand Up @@ -29,7 +29,7 @@ if [ -n "$CI" ]; then
exit 0
fi

test "it a list of commands for the same task (on change)"
test "it allows a list of commands for the same task (on change)"

echo "
- name: run complex command
Expand Down

0 comments on commit 0ba9fac

Please sign in to comment.