Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up test platforms on cancel #156

Merged
merged 2 commits into from
Jun 25, 2024
Merged
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
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
Loading