Eduardo Olivares 86d23b5d08 Do not fail when a certain python version is not available
When a tobiko test step fails because it requires a python version that
is not available, the result should not be failed

Change-Id: I1b1ab5d005d75319873610b03c85b02c8824c202
2022-07-19 19:45:32 +00:00

33 lines
781 B
YAML

---
- name: 'set step variables'
set_fact:
'{{ item.0 }}': '{{ item.1 }}'
loop: '{{ test_step | dictsort }}'
loop_control:
label: '{{ item.0 }} = {{ item.1 }}'
- name: 'set test step index'
set_fact:
tox_step_index: "{{ (tox_step_index | int) + 1 }}"
when:
- (test_workflow_steps | length) > 1
- block:
- name: '{{ test_step.tox_description }}'
include_role:
name: tobiko-tox
rescue:
- name: "add step failure: '{{ tox_step_name }}'"
set_fact:
test_step_failures: '{{ test_step_failures + [test_step] }}'
when: 'found_python_version is not defined or found_python_version == true'
- name: "abort execution at first failure"
debug: var=test_step
when: test_failfast
failed_when: yes