Automatically clean up old TRAP caches by henrymercer · Pull Request #2306 · github/codeql-action (original) (raw)

This PR implements a new feature, behind a flag, that keeps only the newest TRAP cache for each language.

We call the Actions cache APIs directly as these have not yet been added to the @actions/cache npm package.

I have added a unit test exercising most of the functionality, and have also tested this manually using a test repo. I think an integration test is probably not worth it, particularly on this repo where the databases are small enough that TRAP caching skips the upload anyway.

Merge / deployment checklist