PennyLaneAI / pennylane-lightning

The PennyLane-Lightning plugin provides a fast state-vector simulator written in C++ for use with PennyLane
https://docs.pennylane.ai/projects/lightning
Apache License 2.0
92 stars 40 forks source link

Disable CI for draft PRs #847

Closed anthayes92 closed 2 months ago

anthayes92 commented 3 months ago

Context: Tooling Team has requested that all CI checks for draft PRs across all PennyLane repos are to be disabled to free up GH runner resources. SC Story.

Description of the Change: Conditions for checking whether a PR is in draft state have been added to existing workflows.

Benefits: Reduces GH runner usage.

Possible Drawbacks: Some development steps are deferred to PRs in "ready for review" state only.

Related GitHub Issues: N/A

Verification:

Created this PR as draft, only lightweight CI checks use GitHub runners (formatting, changelog reminder). When marked as "ready for review" the CI checks ran (excluding wheel builds and multi-gpu runners). When labels added for wheel builds and multi-gpu runners all CI checks ran.

Screenshot from 2024-08-12 15-26-32

github-actions[bot] commented 3 months ago

Hello. You may have forgotten to update the changelog! Please edit .github/CHANGELOG.md with:

AmintorDusko commented 3 months ago

Can we have a label that could re-enable CIs for draft PRs? We rely a lot on our CI/CD workflows.

mlxd commented 3 months ago

Can we have a label that could re-enable CIs for draft PRs? We rely a lot on our CI/CD workflows.

This was a long-time coming request. We can enable the CI by going out of draft mode. Given the burden the CI has right now, tests are to run in non-draft mode across the org by default.

codecov[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 98.34%. Comparing base (dd5dca1) to head (b75cd06). Report is 1 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #847 +/- ## ========================================== + Coverage 97.59% 98.34% +0.75% ========================================== Files 117 151 +34 Lines 18642 23636 +4994 ========================================== + Hits 18193 23244 +5051 + Misses 449 392 -57 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

anthayes92 commented 3 months ago

Reran CI in "draft" and "ready for review" after adding @Mandrenkov suggestions on operator ordering, all works as expected.

mlxd commented 2 months ago

Hey @anthayes92 Is this good to be merged?

anthayes92 commented 2 months ago

Hey @anthayes92 Is this good to be merged?

Similar reason as mentioned here, though since you have a higher stake in the lightning repo perhaps you'd like to make the call?

Alex-Preciado commented 2 months ago

Let's go ahead and merge this one and also the PennyLane PR (https://github.com/PennyLaneAI/pennylane/pull/6093). We can add a label to run tests in draft mode in a follow-up PR.