From 586b3692f8553847000c07f6ae06880a140b8e7c Mon Sep 17 00:00:00 2001 From: jamshale <31809382+jamshale@users.noreply.github.com> Date: Wed, 9 Oct 2024 10:54:26 -0700 Subject: [PATCH] Continue workflow on fail installs (#1119) Signed-off-by: jamshale --- .github/workflows/create-release-pr.yaml | 40 ++++++++++++++++-------- 1 file changed, 27 insertions(+), 13 deletions(-) diff --git a/.github/workflows/create-release-pr.yaml b/.github/workflows/create-release-pr.yaml index 11dab536a..9adc8f240 100644 --- a/.github/workflows/create-release-pr.yaml +++ b/.github/workflows/create-release-pr.yaml @@ -162,7 +162,17 @@ jobs: continue fi cd $current_folder - poetry install --no-interaction --no-root --extras "aca-py" + + # If the plugin fails to install then consider it as a failed plugin and skip linting + if ! poetry install --no-interaction --no-root --all-extras $i + then + echo "plugin $current_folder failed to install" + failed_plugins+=("$current_folder") + cd .. + continue + fi + + # Run the lint check if poetry run ruff check .; then echo "plugin $current_folder passed lint check" else @@ -187,7 +197,17 @@ jobs: continue fi cd $current_folder - poetry install --no-interaction --no-root --all-extras + + # If the plugin fails to install then consider it as a failed plugin and skip unit tests + if ! poetry install --no-interaction --no-root --all-extras $i + then + echo "plugin $current_folder failed to install" + failed_plugins+=("$current_folder") + cd .. + continue + fi + + # Run the unit test check if poetry run pytest; then echo "plugin $current_folder passed unit test check" else @@ -236,23 +256,17 @@ jobs: cd $current_folder/integration docker compose down --remove-orphans docker compose build - if docker compose run tests; then - echo "plugin $current_folder passed integration test check" - else + if ! docker compose run tests $i + then echo "plugin $current_folder failed integration test check" failed_plugins+=("$current_folder") + continue fi + + echo "plugin $current_folder passed integration test check" cd ../.. done echo integration_test_plugins=${failed_plugins[*]} >> $GITHUB_OUTPUT - #---------------------------------------------- - # Integration Test Failure Check - #---------------------------------------------- - - name: Integration Test Failure Check - if: steps.integration_test_plugins.outputs.integration_test_exit_code == '17' - run: | - echo "Integration tests failed with exit code 17. Skipping commit and release" - echo integration_test_exit_code=17 >> $GITHUB_OUTPUT # ---------------------------------------------- # Prepare Pull Request # ----------------------------------------------