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

CI: add pytest-randomly workflow. #4553

Merged
merged 6 commits into from
Jun 13, 2022

Conversation

rossbar
Copy link
Contributor

@rossbar rossbar commented Jan 21, 2021

Adds a single workflow that runs the test suite with the tests executed in random order. This can help identify problems with poorly-designed tests.

On the one hand, adding this to CI can help improve the robustness of the test suite. OTOH, it can also introduce failures to PRs that are not related to the submitted changes.

One alternative could be to de-couple this from submitted PRs and just have a time or status-based workflow (e.g. run the workflow once a day). LMK if you think this is worthwhile to pursue!

@rossbar
Copy link
Contributor Author

rossbar commented Jan 21, 2021

Note that the failing test for 2d3f598 is an example of the type of problems that this sort of meta-testing catches. Proposed fix in #4554

@MridulS
Copy link
Member

MridulS commented Jan 22, 2021

This is really interesting! +1 on having this run as a cron-job or something on the master branch.

@rossbar
Copy link
Contributor Author

rossbar commented Jan 22, 2021

Okay, I moved the workflow from being triggered on PR/push events to a scheduled one. The only problem is that the GH workflow docs make it seem like I will be the only one who sees notifications about failures (since I'm creating the action). It would be nice if there were a way for other people to subscribe to such notifications, but if I read these docs right it seems like it only goes to the person who last modified the scheduled workflow.

@stefanv
Copy link
Contributor

stefanv commented Jan 26, 2021

We may have to add a manual notification step a-la https://github.com/marketplace/actions/send-email

Base automatically changed from master to main March 4, 2021 18:20
Copy link
Member

@MridulS MridulS left a comment

Choose a reason for hiding this comment

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

Let's get this in 🎉
The circleci failure seems unrelated.

@MridulS
Copy link
Member

MridulS commented Jun 13, 2022

I'll go ahead and merge this and get the cron job up and running on github actions. Let's see if we find more test failures :)

@MridulS MridulS merged commit 00cd32c into networkx:main Jun 13, 2022
@jarrodmillman jarrodmillman added this to the networkx-2.8.4 milestone Jun 13, 2022
MridulS added a commit to MridulS/networkx that referenced this pull request Feb 4, 2023
* Move random test order to scheduled workflow.

* Add missing jobs keyword.

* bump to py3.9 and retrigger build

* run the workflow in the PR

* fix path to requirements

* remove action run from PRs, just run on a schedule

Co-authored-by: Mridul Seth <mail@mriduls.com>
Co-authored-by: Mridul Seth <seth.mridul@gmail.com>
cvanelteren pushed a commit to cvanelteren/networkx that referenced this pull request Apr 22, 2024
* Move random test order to scheduled workflow.

* Add missing jobs keyword.

* bump to py3.9 and retrigger build

* run the workflow in the PR

* fix path to requirements

* remove action run from PRs, just run on a schedule

Co-authored-by: Mridul Seth <mail@mriduls.com>
Co-authored-by: Mridul Seth <seth.mridul@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

5 participants