Like in CircleCI config file I'd like to be able to define cmds over multiple lines
Here is an example how this looks in a CircleCI config yaml:
steps:
- configure-python-version
- checkout
- run:
name: EXECUTE ROBOT COMMAND
command: |
cd tests
robot --include tagname \
--exclude TODO -e future -e obsolete -e libtest \
--console dotted \
--loglevel TRACE \
--noncritical not-ready \
--outputdir results/testsuite-name \
--name testsuite \
robot/test-suite-folder/
With tasks something like this fails with error documented below
# example Taskfile.yml
tasks:
test_all:
desc: RUN ALL ROBOT TESTS
cmds: |
robot -e future -e circleci -e TODO -e obsolete -d results -L TRACE \
--noncritical not-ready robot/QUERY_SERVICE_TESTS
error
yaml: unmarshal errors:
line 78: cannot unmarshal !!str `robot -...` into []*taskfile.Cmd
Hi @testautomation,
You got this error because on v2 (and master), cmds is an array and so you can't declare it as a string. The following would work:
tasks:
test-all:
cmds:
- |
echo 'You command here'
On the (still unreleased) v3, we have alternative tasks syntaxes so you snippet would work. You can check the WIP documentation here.
@andreynering thank you!
Most helpful comment
Hi @testautomation,
You got this error because on v2 (and master),
cmdsis an array and so you can't declare it as a string. The following would work:On the (still unreleased) v3, we have alternative tasks syntaxes so you snippet would work. You can check the WIP documentation here.