drainpipe
drainpipe copied to clipboard
Update ComposerLockDiff workflow to run without DDEV and use a sticky pull request comment
Fixes https://github.com/Lullabot/drainpipe/issues/332
Improvements:
- Action runs now only take about 30 seconds instead of 2+ minutes, no more DDEV install needed
- It will stop early if there are no changes to composer.lock
- It uses https://github.com/IonBazan/composer-diff-action to help run the diff really quickly instead of having to download PHP and install something
- It uses https://github.com/marketplace/actions/sticky-pull-request-comment to post the results back to the PR instead of needing to post to the issue description.
Testing PR: https://github.com/Lullabot/drainpipe-test/pull/11
Run compares:
- https://github.com/Lullabot/lullabot.com-d8/actions/workflows/ComposerLockDiff.yml (current)
- https://github.com/Lullabot/drainpipe-test/actions/workflows/ComposerLockDiff.yml (this PR)
@beto-aveiga is going to review this for https://github.com/Lullabot/drainpipe/issues/318#issuecomment-2117988058 and if there's overlap file a PR against this branch.
We discussed this in the drainpipe sync today. I'd kinda like to see the performance improvement (to not use ddev) and the functional improvement of posting NOT in the description be separate PRs.
[Lullabot internal link to a sample action.]
@beto-aveiga is going to code review and test this branch out on an existing project to determine time saved.
@beto-aveiga Instead of pulling this out of DDEV, we discussed bundling it in with the Static Tests which does use DDEV but we're no longer having to wait for another job to build that container since it's already available.
I'm not sure that bundling it is a wise idea, if static tests fail, or DDEV fails to spin up, we run into the same problem where PRs won't have their diffs posted, which can still be very helpful information to review on a PR while broken jobs get resolved.