Skip to content

Commit

Permalink
[Tidy] Make CI actually fail (#1029)
Browse files Browse the repository at this point in the history
  • Loading branch information
maxschulz-COL authored Feb 19, 2025
1 parent 33dd93a commit 75542cb
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/pycafe-dashboards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: Print PR Number
run: |
echo "Pull Request Number: ${{ github.event.workflow_run.pull_requests[0].number }}"
- name: Test PyCafe links
- name: Test PyCafe links # Eventually we should merge this with the create_pycafe_links_comments.py script
run: |
hatch run python ../tools/pycafe/test_pycafe_links.py --github-token ${{ github.token }} --repo-name ${{ github.repository }} --run-id ${{ github.event.workflow_run.id }} --commit-sha ${{ github.event.workflow_run.head_sha }}
- name: Create PyCafe links
Expand Down
6 changes: 6 additions & 0 deletions tools/pycafe/test_pycafe_links.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from pycafe_utils import (
PyCafeConfig,
create_github_client,
create_status_check,
generate_link,
)

Expand Down Expand Up @@ -66,5 +67,10 @@ def test_pycafe_link(url: str, wait_for_text: str):
# Test the link
success = test_pycafe_link(url=url_generated, wait_for_text="Vizro Features")

# Only create a status check if the test fails. On success, the status check will be created
# by the create_pycafe_links_comments.py script when it posts the comment.
if not success:
create_status_check(commit, dev_directory, url_generated, state="failure")

# Exit with appropriate status code
sys.exit(0 if success else 1)
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 75542cb

Please sign in to comment.