Skip to content

Commit

Permalink
Clean up test platforms on cancel (#156)
Browse files Browse the repository at this point in the history
* Clean up test platforms on cancel

* Add missing shell to action step
  • Loading branch information
mkjpryor authored Jun 25, 2024
1 parent e5964da commit f8b75a3
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions .github/actions/test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,10 @@ runs:
- name: Run test suite
shell: bash
run: |
set -eo pipefail
set -e
source ./ci.env
source ./bin/activate "$AZIMUTH_CONFIG_ENVIRONMENT" "$AZIMUTH_ENVIRONMENT"
test_directory="$(ansible -m debug -a "var=$VAR_NAME" all | jq -r ".plays[0].tasks[0].hosts.localhost.$VAR_NAME")"
robot --loglevel debug --consolecolors on "$test_directory"
env:
ANSIBLE_LOAD_CALLBACK_PLUGINS: "true"
ANSIBLE_STDOUT_CALLBACK: json
MOZ_HEADLESS: "1"
VAR_NAME: generate_tests_suite_directory
./bin/run-tests
- name: Upload test report artifacts
uses: actions/upload-artifact@v3
Expand All @@ -54,6 +48,15 @@ runs:
report.html
if: ${{ always() }}

- name: Clean up test platforms
shell: bash
run: |
set -e
source ./ci.env
source ./bin/activate "$AZIMUTH_CONFIG_ENVIRONMENT" "$AZIMUTH_ENVIRONMENT"
./bin/run-tests --include delete
if: ${{ cancelled() }}

- name: Create debug bundle
shell: bash
run: |
Expand Down

0 comments on commit f8b75a3

Please sign in to comment.