Skip to content

Commit

Permalink
Fix running status in circleci failed the tests (#255)
Browse files Browse the repository at this point in the history
  • Loading branch information
l0uden authored Jan 9, 2024
1 parent 26b610b commit 5453a61
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 7 deletions.
28 changes: 23 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,30 @@ jobs:
echo $created_workflow_status
if [[ "$created_workflow_status" != "success" ]]; then
echo "Workflow not successful - ${created_workflow_status}"
(exit -1)
fi
if [[ "$created_workflow_status" == "running" ]]; then
created_workflow_status_updated=$(curl --request GET \
--url "https://circleci.com/api/v2/pipeline/${triggered_pipeline_id}/workflow" \
--header "Circle-Token: $CIRCLECI_API_KEY" \
--header "content-type: application/json" \
| jq -r '.items[0].status'
)
while [[ "$created_workflow_status_updated" == "running" ]]
do
created_workflow_status_updated=$(curl --request GET \
--url "https://circleci.com/api/v2/pipeline/${triggered_pipeline_id}/workflow" \
--header "Circle-Token: $CIRCLECI_API_KEY" \
--header "content-type: application/json" \
| jq -r '.items[0].status'
)
done
if [[ "$created_workflow_status_updated" != "success" ]]; then
echo "Workflow not successful - ${created_workflow_status_updated}"
(exit -1)
fi
echo "Created workflow successful"
echo "Created workflow successful"
fi
workflows:
version: 2
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/release-if-needed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ jobs:
echo "package_version=${{ env.PACKAGE_VERSION }}" >> $GITHUB_OUTPUT
if [ "${{ env.PACKAGE_NAME }}" == "vizro-ai" ]; then
echo "dist_package_name=vizro_ai" >> $GITHUB_OUTPUT
else echo "dist_package_name=${{ env.PACKAGE_NAME }}" >> $GITHUB_OUTPUT
elif [ "${{ env.PACKAGE_NAME }}" == "vizro-core" ]; then
echo "dist_package_name=vizro" >> $GITHUB_OUTPUT
fi
outputs:
new_release: ${{ steps.version_check.outputs.new_release }}
Expand Down Expand Up @@ -92,7 +93,7 @@ jobs:
cd "${{ needs.check-version.outputs.package_name }}/dist"
local=$(md5sum ${{ needs.check-version.outputs.dist_package_name }}-${{ needs.check-version.outputs.package_version }}-py3-none-any.whl)
cd ..
pip download ${{ needs.check-version.outputs.package_name }}==${{ needs.check-version.outputs.package_version }} -d . --no-deps --timeout 300
pip download ${{ needs.check-version.outputs.dist_package_name }}==${{ needs.check-version.outputs.package_version }} -d . --no-deps --timeout 300
pypi=$(md5sum ${{ needs.check-version.outputs.dist_package_name }}-${{ needs.check-version.outputs.package_version }}-py3-none-any.whl)
if [[ $local = $pypi ]]; then echo "md5 hash is the same"; else echo "md5 hash is not the same"; exit 1; fi
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<!--
A new scriv changelog fragment.
Uncomment the section that is right (remove the HTML comment wrapper).
-->

<!--
### Highlights ✨
- A bullet item for the Highlights ✨ category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))
-->
<!--
### Removed
- A bullet item for the Removed category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))
-->
<!--
### Added
- A bullet item for the Added category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))
-->
<!--
### Changed
- A bullet item for the Changed category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))
-->
<!--
### Deprecated
- A bullet item for the Deprecated category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))
-->
<!--
### Fixed
- A bullet item for the Fixed category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))
-->
<!--
### Security
- A bullet item for the Security category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))
-->

0 comments on commit 5453a61

Please sign in to comment.