Skip to content

Commit 586b369

Browse files
authored
Continue workflow on fail installs (#1119)
Signed-off-by: jamshale <jamiehalebc@gmail.com>
1 parent b0bbe19 commit 586b369

File tree

1 file changed

+27
-13
lines changed

1 file changed

+27
-13
lines changed

.github/workflows/create-release-pr.yaml

Lines changed: 27 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,17 @@ jobs:
162162
continue
163163
fi
164164
cd $current_folder
165-
poetry install --no-interaction --no-root --extras "aca-py"
165+
166+
# If the plugin fails to install then consider it as a failed plugin and skip linting
167+
if ! poetry install --no-interaction --no-root --all-extras $i
168+
then
169+
echo "plugin $current_folder failed to install"
170+
failed_plugins+=("$current_folder")
171+
cd ..
172+
continue
173+
fi
174+
175+
# Run the lint check
166176
if poetry run ruff check .; then
167177
echo "plugin $current_folder passed lint check"
168178
else
@@ -187,7 +197,17 @@ jobs:
187197
continue
188198
fi
189199
cd $current_folder
190-
poetry install --no-interaction --no-root --all-extras
200+
201+
# If the plugin fails to install then consider it as a failed plugin and skip unit tests
202+
if ! poetry install --no-interaction --no-root --all-extras $i
203+
then
204+
echo "plugin $current_folder failed to install"
205+
failed_plugins+=("$current_folder")
206+
cd ..
207+
continue
208+
fi
209+
210+
# Run the unit test check
191211
if poetry run pytest; then
192212
echo "plugin $current_folder passed unit test check"
193213
else
@@ -236,23 +256,17 @@ jobs:
236256
cd $current_folder/integration
237257
docker compose down --remove-orphans
238258
docker compose build
239-
if docker compose run tests; then
240-
echo "plugin $current_folder passed integration test check"
241-
else
259+
if ! docker compose run tests $i
260+
then
242261
echo "plugin $current_folder failed integration test check"
243262
failed_plugins+=("$current_folder")
263+
continue
244264
fi
265+
266+
echo "plugin $current_folder passed integration test check"
245267
cd ../..
246268
done
247269
echo integration_test_plugins=${failed_plugins[*]} >> $GITHUB_OUTPUT
248-
#----------------------------------------------
249-
# Integration Test Failure Check
250-
#----------------------------------------------
251-
- name: Integration Test Failure Check
252-
if: steps.integration_test_plugins.outputs.integration_test_exit_code == '17'
253-
run: |
254-
echo "Integration tests failed with exit code 17. Skipping commit and release"
255-
echo integration_test_exit_code=17 >> $GITHUB_OUTPUT
256270
# ----------------------------------------------
257271
# Prepare Pull Request
258272
# ----------------------------------------------

0 commit comments

Comments
 (0)