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

Running stardis test with tardis push commits #201

Conversation

KasukabeDefenceForce
Copy link

@KasukabeDefenceForce KasukabeDefenceForce commented Jul 16, 2024

📝 Description

Type: 🪲 bugfix | 🚀 feature | ☣️ breaking change | 🚦 testing | 📝 documentation | 🎢 infrastructure

The PR aims to run stardis tests after every commit on the tardis master branch. It is related to #2708 in tardis.

📌 Resources

Examples, notebooks, and links to useful references.

🚦 Testing

How did you test these changes?

  • Testing pipeline
  • Other method (describe)
  • My changes can't be tested (explain why)

☑️ Checklist

  • I requested two reviewers for this pull request
  • I updated the documentation according to my changes
  • I built the documentation by applying the build_docs label

Note: If you are not allowed to perform any of these actions, ping (@) a contributor.

@KasukabeDefenceForce
Copy link
Author

@KasukabeDefenceForce
Copy link
Author

https://github.com/KasukabeDefenceForce/stardis/actions/runs/10009941365/job/27669964721

I made some changes with ion_number_density, so that the stardis tests fail and it worked.

@@ -65,8 +67,14 @@ jobs:
id: install-tardis
# shell: bash -l {0}
run: |
pip install git+https://github.com/tardis-sn/tardis.git

if [ "${{ github.event.action }}" == "Tardis-Dispatch" ]; then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just do this using if conditional syntax of github actions right?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can do that as well, i thought creating two different steps might be confusing. But i will refactor this with if syntax of github actions.

@@ -2,6 +2,8 @@ name: tests

on:
push:
repository_dispatch:
types: [Tardis-Dispatch]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be tardis-dispatch right? is the convention alright?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep i will fix this.


if [ "${{ github.event.action }}" == "Tardis-Dispatch" ]; then
echo "Triggered by repository dispatch, installing the latest version of TARDIS."
pip install git+https://github.com/${{github.repository_owner}}/tardis.git@${{ github.event.client_payload.commit_sha }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry if I dont understand this completely,the commit sha, is this intended to be sent by the pull request? will this work as a part of the release workflow? what about workflow dispatch?

Copy link
Author

@KasukabeDefenceForce KasukabeDefenceForce Jul 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After giving more thought to this, i believe there is no need for the if else condtions, because it is already fetching the latest commit in both cases. The release workflow merges a PR into the master so that will trigger it and yes we can trigger it manually as well.

pip install git+https://github.com/${{github.repository_owner}}/tardis.git@${{ github.event.client_payload.commit_sha }}
else
echo "Not triggered by repository dispatch, installing the latest version of TARDIS."
pip install git+https://github.com/${{ github.repository_owner }}/tardis.git
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

repo owner will always be tardis-sn right?

Copy link
Author

@KasukabeDefenceForce KasukabeDefenceForce Jul 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants