Skip to content
This repository was archived by the owner on Oct 8, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions roles/tests/tests_behat/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ behat:
install: false # set to true if you want ce-deploy to attempt to composer install Behat
tags: "~@javascript" # behat tags to run
verbose: false # set to true for verbose output
fail_builds: true # set to false if you do not want Ansible to stop if Behat tests fail
bin: "{{ deploy_path }}/vendor/bin/behat" # location of Behat
# List of outputs to create, defaults to 'pretty' to STDOUT
outputs:
Expand Down
14 changes: 13 additions & 1 deletion roles/tests/tests_behat/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,16 @@
- name: Run Behat command.
ansible.builtin.command:
cmd: "{{ behat.bin }} --config={{ behat.config_file }} --tags={{ behat.tags }} {{ _behat_outputs }}"
when: behat.outputs | length > 0
chdir: "{{ behat.working_dir }}"
when:
- behat.outputs | length > 0
- behat.fail_builds

- name: Run Behat command without failing build.
ansible.builtin.command:
cmd: "{{ behat.bin }} --config={{ behat.config_file }} --tags={{ behat.tags }} {{ _behat_outputs }}"
chdir: "{{ behat.working_dir }}"
failed_when: false
when:
- behat.outputs | length > 0
- not behat.fail_builds