Skip to content

Speed up the Tests workflow by caching Composer downloads - #213

Open
shanesmithdev wants to merge 1 commit into
NativePHP:mainfrom
shanesmithdev:speed-up-tests-workflow
Open

shanesmithdev wants to merge 1 commit into
NativePHP:mainfrom
shanesmithdev:speed-up-tests-workflow

Conversation

@shanesmithdev

@shanesmithdev shanesmithdev commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Every Tests run downloaded all of Composer's dependencies from scratch. This keeps Composer's download cache between runs, keyed on composer.lock, so a run only downloads what changed since the last one. If composer.lock changes, the run starts from the most recent cache and saves a new one.

Pull requests from forks can restore caches saved on main, and runs on main install the licensed plugins. So the workflow removes those three plugins from the cache before saving it, and the cache never holds licensed code. Runs with credentials still download the three plugins every time.

A new push to a pull request now cancels the run still going for the old one, so superseded commits stop using runner time. Each commit on main still gets its own run, so every one is tested.

While here, actions/checkout goes from v4 to v7.

Screenshots

  • No visible change

@shanesmithdev shanesmithdev changed the title Cache Composer downloads and cancel superseded runs in the Tests workflow Speed up the Tests workflow by caching Composer downloads Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant