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

Save minutes by avoiding duplicate test runs #515

Merged
merged 1 commit into from
Apr 17, 2024

Conversation

glatterf42
Copy link
Member

@glatterf42 glatterf42 commented Jan 25, 2024

This PR removes the trigger for CI runs on pushed to main to avoid duplicate test runs. This avoids duplicate runs.

In order for this to work properly, we should make sure that

  • main can only be reached via PRs
  • PRs need to be up to date with main
  • PRs require several tests to be successful before merging

We might also want to

  • expand the number of tests we require to be successful

All of which can be done via the settings -> branches.

For now, we require the py3.12 checks for macos, ubuntu, and windows to be successful.

How to review

  • Read the diff and note that the CI checks all pass.

PR checklist

  • Continuous integration checks all ✅
  • [ ] Add or expand tests; coverage checks both ✅ Just changing how often tests are run.
  • [ ] Add, expand, or update documentation. Just changing how often tests are run.
  • [ ] Update release notes. Just changing how often tests are run.

@glatterf42 glatterf42 added the ci Continuous integration label Jan 25, 2024
@glatterf42 glatterf42 added this to the 3.9 milestone Jan 25, 2024
@glatterf42 glatterf42 self-assigned this Jan 25, 2024
Copy link

codecov bot commented Jan 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.9%. Comparing base (4119b93) to head (c3a7153).

Additional details and impacted files
@@          Coverage Diff          @@
##            main    #515   +/-   ##
=====================================
  Coverage   98.9%   98.9%           
=====================================
  Files         44      44           
  Lines       4804    4804           
=====================================
  Hits        4754    4754           
  Misses        50      50           

@khaeru
Copy link
Member

khaeru commented Jan 25, 2024

Some notes for this and the parallel PRs iiasa/message_ix#785, iiasa/message-ix-models#150, iiasa/message_data#527:

  • Others settings that currently differ, which we could consider aligning:

    • Require 1+ approving reviews.
    • RTD build as a required check.
  • Specifically related to Save minutes by avoiding duplicate test runs message-ix-models#150 (comment), it might be possible to:

    In practice, we will always lag the latest Python: for instance, the moment Python 3.13 is released, some of our dependencies will not be installable on that version for various reasons. But such jobs could allow us to automatically monitor compatibility with newer versions of Python and simply notice (by looking at scheduled runs) when that compatibility is achieved.

    IMO this is low priority, since this doesn't cost us a lot of time currently.

khaeru added a commit that referenced this pull request Jan 29, 2024
@glatterf42 glatterf42 force-pushed the update/pytest-workflow-triggers branch from 8b2396c to fb12ce0 Compare April 12, 2024 06:31
@khaeru khaeru force-pushed the update/pytest-workflow-triggers branch from fb12ce0 to c3a7153 Compare April 16, 2024 10:26
@khaeru
Copy link
Member

khaeru commented Apr 16, 2024

@glatterf42 should we merge this? Anything else to be done?

@glatterf42
Copy link
Member Author

I think it's good to go :)

@glatterf42 glatterf42 merged commit 707353e into iiasa:main Apr 17, 2024
21 checks passed
@glatterf42 glatterf42 deleted the update/pytest-workflow-triggers branch April 17, 2024 06:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci Continuous integration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants