Skip to content

Instantly share code, notes, and snippets.

@jodyHamilton
Created June 7, 2016 14:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jodyHamilton/8577b249c84b45607e0b62a1736d8443 to your computer and use it in GitHub Desktop.
Save jodyHamilton/8577b249c84b45607e0b62a1736d8443 to your computer and use it in GitHub Desktop.
steps:
- name: Run behat tests
command: 'cd /var/www/html/tests ; composer install ; ./bin/behat --profile probo --tags "~@javascript"'
- name: Run behat js tests
command: 'wget http://selenium-release.storage.googleapis.com/2.48/selenium-server-standalone-2.48.2.jar ; apt-get install xvfb -y ; xvfb-run java -jar selenium-server-standalone-2.48.2.jar & ; ./bin/behat --profile probo --tags "@javascript" ; disown'
@benjifisher
Copy link

Instead of

cd /var/www/html/tests ; composer install ; ./bin/behat --profile probo --tags "~@javascript"

(separating the subcommands with semicolons) I would use

cd /var/www/html/tests && composer install && ./bin/behat --profile probo --tags "~@javascript"

The difference is that if one of the subcommands fails (returns a non-zero exit code) then the later subcommands will not be executed if you separate them with &&.

I would also use && instead of ; for the second command.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment