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

Continue workflow on fail installs #660

Merged
merged 1 commit into from
Oct 9, 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
40 changes: 27 additions & 13 deletions .github/workflows/create-release-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
# ----------------------------------------------
Expand Down
Loading