-
Notifications
You must be signed in to change notification settings - Fork 5
CI: Run test_examples.py only on releases
#68
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
Conversation
|
@sbillinge ready for review, this will fail tests until the |
|
I don't love this fix. I think it is a bit of an overkill to set an environment variable for this purpose. Why don't we just make it that the run examples only runs on |
|
@sbillinge The challenge I'm running into with this is still using the release script Option 1 is the environment variable. Option 2 is separately maintaining a Option 3 (most recent changes) is to add |
|
Is it possible to run a test on a file that has a non-standard name? Could we just change the name of the file from |
|
@sbillinge I like that idea. I'll implement it. |
|
@sbillinge ready for review. I tried to mimmic the release scripts workflow for the manual trigger: https://github.com/scikit-package/release-scripts/blob/v0/.github/workflows/_tests-on-pr.yml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this looks good.
Did you test that it works?
I think we should maybe move validate_examples.py to a directory called validators as it is not a file that does unit tests.
This isn't running them on all platforms and python versions, right? or it does? Which do we want?
|
@sbillinge the examples only run on ubuntu and python 3.13 as is. moving this test inside |
|
I ran CI on my fork and it passed: https://github.com/cadenmyers13/diffpy.cmi/actions/runs/18986658748/job/54231707607 |
|
This should pass all tests when the other PR is merged |
I merged the other PR and reran hte tests but no luck. Please could you take another look? |
|
I merged this anyway, but we have to figure out why tests are failing and fix it with some urgency.... |
closes #46
This CI script sets
RUN_EXAMPLES=1on diffpy.cmi releases. IfRUN_EXAMPLESisn't set, then the scripts aren't ran; therefore, this variable is only set on releases and not on PRs, meaning examples scripts won't be ran on every PR/push to a PR. If maintainers want to run this tests locally they runThe caveat to this is that on releases,
test_examples.pywill be ran once, and all other tests will be ran twice. I don't think this is that big of an issue since the other tests run very quickly.