Skip to content

Commit f8b75a3

Browse files
author
Matt Pryor
authored
Clean up test platforms on cancel (azimuth-cloud#156)
* Clean up test platforms on cancel * Add missing shell to action step
1 parent e5964da commit f8b75a3

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

.github/actions/test/action.yml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,10 @@ runs:
3333
- name: Run test suite
3434
shell: bash
3535
run: |
36-
set -eo pipefail
36+
set -e
3737
source ./ci.env
3838
source ./bin/activate "$AZIMUTH_CONFIG_ENVIRONMENT" "$AZIMUTH_ENVIRONMENT"
39-
test_directory="$(ansible -m debug -a "var=$VAR_NAME" all | jq -r ".plays[0].tasks[0].hosts.localhost.$VAR_NAME")"
40-
robot --loglevel debug --consolecolors on "$test_directory"
41-
env:
42-
ANSIBLE_LOAD_CALLBACK_PLUGINS: "true"
43-
ANSIBLE_STDOUT_CALLBACK: json
44-
MOZ_HEADLESS: "1"
45-
VAR_NAME: generate_tests_suite_directory
39+
./bin/run-tests
4640
4741
- name: Upload test report artifacts
4842
uses: actions/upload-artifact@v3
@@ -54,6 +48,15 @@ runs:
5448
report.html
5549
if: ${{ always() }}
5650

51+
- name: Clean up test platforms
52+
shell: bash
53+
run: |
54+
set -e
55+
source ./ci.env
56+
source ./bin/activate "$AZIMUTH_CONFIG_ENVIRONMENT" "$AZIMUTH_ENVIRONMENT"
57+
./bin/run-tests --include delete
58+
if: ${{ cancelled() }}
59+
5760
- name: Create debug bundle
5861
shell: bash
5962
run: |

0 commit comments

Comments
 (0)