File tree 2 files changed +26
-10
lines changed
2 files changed +26
-10
lines changed Original file line number Diff line number Diff line change 48
48
sudo apt install -y ansible python3-pip
49
49
sudo ansible-galaxy collection install community.docker
50
50
51
+
52
+ - name : Get PR branch
53
+ id : pr_branch
54
+ uses : xt0rted/pull-request-comment-branch@v2
55
+
51
56
- name : Checkout code
52
57
uses : actions/checkout@v3
58
+ with :
59
+ ref : ${{ steps.pr_branch.outputs.head_ref }}
53
60
54
61
- name : Run playbook
55
62
id : run-playbook
Original file line number Diff line number Diff line change 47
47
('success' not in prometheus_metrics.stdout) or
48
48
('"result": []' in prometheus_metrics.stdout)
49
49
50
- - name : Run mock-acpi validator
51
- shell : |
52
- cd {{ validator_dir }}
53
- hatch run validator -f ./validator.mock-acpi.yaml validate-acpi -d 1m
54
- when : prometheus_metrics is success
55
- register : mock_acpi_validator
56
- failed_when : |
57
- ('error' in mock_acpi_validator.stdout.lower()) or
58
- ('mse exceeded' in mock_acpi_validator.stdout.lower()) or
59
- ('mape exceeded' in mock_acpi_validator.stderr.lower())
50
+ - block :
51
+ - name : Run mock-acpi validator
52
+ shell : |
53
+ cd {{ validator_dir }}
54
+ hatch run validator -f ./validator.mock-acpi.yaml validate-acpi -d 1m
55
+ when : prometheus_metrics is success
56
+ register : mock_acpi_validator
57
+ always :
58
+ - name : Output the results of validator
59
+ debug :
60
+ var : mock_acpi_validator
61
+
62
+ - name : Check for errors in validator
63
+ fail :
64
+ msgg : " Mock-ACPI validator failed with the following errors: {{ mock_acpi_validator.stdout }} {{ mock_acpi_validator.stderr }}"
65
+ when : >
66
+ ('error' in mock_acpi_validator.stdout.lower()) or
67
+ ('mse exceeded' in mock_acpi_validator.stdout.lower()) or
68
+ ('mape exceeded' in mock_acpi_validator.stderr.lower())
You can’t perform that action at this time.
0 commit comments