Skip to content

feat: add audit output caching for execute plugin #1057

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

Merged
merged 9 commits into from
Aug 11, 2025

Conversation

BioPhoton
Copy link
Collaborator

@BioPhoton BioPhoton commented Aug 8, 2025

This PR includes:

  • add utils for runner result caching
  • add cache options to executePlugin and executePlugins
  • add CacheConfig to models package and use it in core package

Related:
#1048

Copy link

github-actions bot commented Aug 8, 2025

Code PushUp

🤨 Code PushUp report has both improvements and regressions – compared current commit f8eec51 with previous commit ae52e3b.

🕵️ See full comparison in Code PushUp portal 🔍

🏷️ Categories

🏷️ Category ⭐ Previous score ⭐ Current score 🔄 Score change
Performance 🔴 31 🔴 31 ↓ −0.2
Updates 🟡 76 🟡 77 ↑ +0.1
Code coverage 🟢 90 🟢 90 ↑ +0.1
Documentation 🔴 23 🔴 23 ↓ −0.1
Security 🔴 0 🔴 0
Accessibility 🟢 92 🟢 92
Best Practices 🟢 100 🟢 100
SEO 🟡 61 🟡 61
Type Safety 🟢 100 🟢 100
Bug prevention 🟢 100 🟢 100
Miscellaneous 🟢 100 🟢 100
Code style 🟢 100 🟢 100
👍 2 groups improved, 👎 2 groups regressed, 👍 4 audits improved, 👎 5 audits regressed, 13 audits changed without impacting score

🗃️ Groups

🔌 Plugin 🗃️ Group ⭐ Previous score ⭐ Current score 🔄 Score change
Lighthouse Performance 🔴 31 🔴 31 ↓ −0.2
JS Packages NPM outdated dependencies 🟡 76 🟡 77 ↑ +0.1
Code coverage Code coverage metrics 🟢 90 🟢 90 ↑ +0.1
JSDoc coverage Documentation coverage 🔴 23 🔴 23 ↓ −0.1

17 other groups are unchanged.

🛡️ Audits

🔌 Plugin 🛡️ Audit 📏 Previous value 📏 Current value 🔄 Value change
Lighthouse Speed Index 🟥 8.4 s 🟥 9.5 s ↑ +13.1 %
Lighthouse First Contentful Paint 🟥 3.2 s 🟥 3.1 s ↓ −4 %
Lighthouse Time to Interactive 🟥 18.6 s 🟥 19.7 s ↑ +5.8 %
JS Packages Outdated NPM dev dependencies. 🟨 55 outdated package versions (30 major, 21 minor, 4 patch) 🟨 55 outdated package versions (30 major, 21 minor, 4 patch)  +0 %
JSDoc coverage Types coverage 🟥 232 undocumented types 🟥 235 undocumented types ↑ +1.3 %
Code coverage Line coverage 🟨 86.7 % 🟨 86.8 % ↑ +0.1 %
Code coverage Function coverage 🟩 93.1 % 🟩 93.1 % ↑ +0.1 %
Code coverage Branch coverage 🟨 85 % 🟨 85 % ↓ −0.1 %
JSDoc coverage Variables coverage 🟥 221 undocumented variables 🟥 224 undocumented variables ↑ +1.4 %
Lighthouse Avoids enormous network payloads 🟩 Total size was 2,649 KiB 🟩 Total size was 2,660 KiB ↑ +0.4 %
Lighthouse Minimizes main-thread work 🟥 21.9 s 🟥 25.1 s ↑ +14.7 %
Lighthouse Uses efficient cache policy on static assets 🟨 30 resources found 🟨 30 resources found ↓ −0.4 %
Lighthouse Total Blocking Time 🟥 7,080 ms 🟥 9,190 ms ↑ +29.8 %
Lighthouse Metrics 🟩 100% 🟩 100% ↑ +5.8 %
Lighthouse JavaScript execution time 🟥 10.4 s 🟥 11.4 s ↑ +9.5 %
Lighthouse Server Backend Latencies 🟩 1,050 ms 🟩 1,850 ms ↑ +75.8 %
Lighthouse Largest Contentful Paint 🟥 12.5 s 🟥 13.1 s ↑ +4.6 %
Lighthouse Max Potential First Input Delay 🟥 2,400 ms 🟥 2,770 ms ↑ +15.4 %
Lighthouse Reduce unused CSS 🟥 Potential savings of 92 KiB 🟥 Potential savings of 102 KiB ↑ +33.3 %
Lighthouse Initial server response time was short 🟩 Root document took 510 ms 🟩 Root document took 420 ms ↓ −16.9 %
Lighthouse Avoids an excessive DOM size 🟥 2,259 elements 🟥 2,277 elements ↑ +0.8 %
Lighthouse Network Round Trip Times 🟩 10 ms 🟩 30 ms ↑ +80.1 %

588 other audits are unchanged.

@BioPhoton BioPhoton marked this pull request as ready for review August 8, 2025 22:49
@BioPhoton BioPhoton requested a review from matejchalk August 8, 2025 22:49
Copy link
Collaborator

@matejchalk matejchalk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for the fast PR 👍

Copy link

pkg-pr-new bot commented Aug 11, 2025

Open in StackBlitz

@code-pushup/ci

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/ci@1057

@code-pushup/cli

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/cli@1057

@code-pushup/create-cli

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/create-cli@1057

@code-pushup/models

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/models@1057

@code-pushup/nx-plugin

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/nx-plugin@1057

@code-pushup/core

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/core@1057

@code-pushup/coverage-plugin

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/coverage-plugin@1057

@code-pushup/eslint-plugin

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/eslint-plugin@1057

@code-pushup/js-packages-plugin

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/js-packages-plugin@1057

@code-pushup/jsdocs-plugin

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/jsdocs-plugin@1057

@code-pushup/lighthouse-plugin

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/lighthouse-plugin@1057

@code-pushup/typescript-plugin

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/typescript-plugin@1057

@code-pushup/utils

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/utils@1057

commit: 3082015

@BioPhoton BioPhoton merged commit 7daf201 into main Aug 11, 2025
17 of 19 checks passed
@BioPhoton BioPhoton deleted the feat/core/add-plugin-outputs-generation branch August 11, 2025 19:18
BioPhoton added a commit that referenced this pull request Aug 12, 2025
This PR depends on:
- #1058 
- #1057   

This PR includes: 
- docs on [`--cache` options and
caching](https://github.com/code-pushup/cli/pull/1059/files#diff-5357afeca9b96eccbc161aa37719ecf7668ac0ebae529e0695f2a9da5cf3b144)
- docs on [how to cache with
Nx](https://github.com/code-pushup/cli/pull/1059/files#diff-15986190ef9581ab59bcd5483b2c09e7fd0bd439d6f6cddbc94b0b1de094ee51)
  - docs on how to use with Turborepo
- logic to respect cache options
- e2e tests testing the full cache flow (inc `--skipReports`)

Suggested followup PR would be to implement Nx caching. This is
partially started here: #1035.

> [!note]
> Potential changes arrive after #1058 is merged

Closes #1048

---------

Co-authored-by: Matěj Chalk <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants