Skip to content

chore: add standalone target with plugin caching #1062

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

Open
wants to merge 61 commits into
base: main
Choose a base branch
from

Conversation

BioPhoton
Copy link
Collaborator

@BioPhoton BioPhoton commented Aug 12, 2025

Followup of:

Precondition:

This PR includes:

  • add helper to load envVars
  • adjusted nx.json
    • add defaultTargets for main and plugin code-pushup targets
    • add default inputs
  • add plugin caching to code-pushup target
  • cache js-packages and invalidate daily
  • GH adjustments
    • added affected and --parallel=3
  • Adjust path helper that that created Nx project graph to use readCachedProjectGraph to avoid problems when running plugins in parallel

Note

I cache the js-packges plugin target, against our discussion, as only in this PR I would have saved ~4min

Followup Todos:

  • move zod2md.ts under tools and leverage "!{projectRoot}/tools/**/*" in nx.json#namedInputs.production
  • rename nx-plugin/mock to models/mocks and adjust inputs
  • cleanup e2e targets leverage nx.json#targetDefaults
  • include only relevant projects in plugin-eslint config
  • stricter task dependencies to avoid running tracked libs e.g. nx run test-nx-utils:unit-test is executed ATM
  • understand why e2e tests fail if nx.json#defaultTargets[N].@nx/vite:test as empty ({}) target is removed

Copy link

pkg-pr-new bot commented Aug 12, 2025

Open in StackBlitz

@code-pushup/ci

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

@code-pushup/create-cli

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

@code-pushup/cli

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

@code-pushup/models

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

@code-pushup/nx-plugin

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

@code-pushup/core

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

@code-pushup/coverage-plugin

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

@code-pushup/eslint-plugin

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

@code-pushup/js-packages-plugin

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

@code-pushup/jsdocs-plugin

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

@code-pushup/lighthouse-plugin

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

@code-pushup/typescript-plugin

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

@code-pushup/utils

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

@code-pushup/models-transformers

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

commit: ff016c4

Copy link

github-actions bot commented Aug 12, 2025

Code PushUp

🤨 Code PushUp report has both improvements and regressions – compared current commit 8722244 with previous commit 97c31f8.

🕵️ See full comparison in Code PushUp portal 🔍

🏷️ Categories

🏷️ Category ⭐ Previous score ⭐ Current score 🔄 Score change
Performance 🔴 34 🔴 33 ↓ −1.8
Code coverage 🟢 91 🟢 90 ↓ −0.1
Documentation 🔴 23 🔴 23 ↑ +0.1
Security 🔴 0 🔴 0
Updates 🟡 77 🟡 77
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
👍 1 group improved, 👎 2 groups regressed, 👍 1 audit improved, 👎 6 audits regressed, 14 audits changed without impacting score

🗃️ Groups

🔌 Plugin 🗃️ Group ⭐ Previous score ⭐ Current score 🔄 Score change
Lighthouse Performance 🔴 34 🔴 33 ↓ −1.8
Code coverage Code coverage metrics 🟢 91 🟢 90 ↓ −0.1
JSDoc coverage Documentation coverage 🔴 23 🔴 23 ↑ +0.1

18 other groups are unchanged.

🛡️ Audits

🔌 Plugin 🛡️ Audit 📏 Previous value 📏 Current value 🔄 Value change
Lighthouse Speed Index 🟥 6.9 s 🟥 7.3 s ↑ +5.6 %
Lighthouse Total Blocking Time 🟥 2,360 ms 🟥 3,720 ms ↑ +57.2 %
Lighthouse First Contentful Paint 🟥 3.1 s 🟥 3.2 s ↑ +1.6 %
JSDoc coverage Functions coverage 🟥 516 undocumented functions 🟥 516 undocumented functions  +0 %
Code coverage Function coverage 🟩 93.2 % 🟩 93.1 % ↓ −0.1 %
Code coverage Line coverage 🟨 87.6 % 🟨 87.6 % ↓ −0.1 %
Code coverage Branch coverage 🟨 86.3 % 🟨 86.3 % ↓ −0.1 %
Lighthouse Avoids enormous network payloads 🟩 Total size was 2,656 KiB 🟩 Total size was 2,646 KiB ↓ −0.4 %
Lighthouse Minimizes main-thread work 🟥 11.8 s 🟥 13.7 s ↑ +15.9 %
Lighthouse JavaScript execution time 🟥 5.1 s 🟥 6.0 s ↑ +17.8 %
Lighthouse Server Backend Latencies 🟩 540 ms 🟩 260 ms ↓ −51.6 %
Lighthouse Uses efficient cache policy on static assets 🟨 30 resources found 🟨 30 resources found ↓ −0.1 %
Lighthouse Initial server response time was short 🟩 Root document took 590 ms 🟩 Root document took 350 ms ↓ −41.1 %
Lighthouse Time to Interactive 🟥 17.1 s 🟥 17.3 s ↑ +1.3 %
Lighthouse Metrics 🟩 100% 🟩 100% ↑ +1.3 %
Lighthouse Reduce unused JavaScript 🟥 Potential savings of 591 KiB 🟥 Potential savings of 614 KiB ↑ +20.5 %
Lighthouse Remove duplicate modules in JavaScript bundles 🟥 Potential savings of 95 KiB 🟥 Potential savings of 97 KiB ↓ −34 %
Lighthouse Reduce unused CSS 🟥 Potential savings of 116 KiB 🟥 Potential savings of 116 KiB ↓ −19.2 %
Lighthouse Max Potential First Input Delay 🟥 1,340 ms 🟥 1,270 ms ↓ −5.1 %
Lighthouse Network Round Trip Times 🟩 70 ms 🟩 30 ms ↓ −59.2 %
Lighthouse Largest Contentful Paint 🟥 11.5 s 🟥 11.6 s ↑ +0.3 %

589 other audits are unchanged.

@BioPhoton BioPhoton changed the title chore: add env var helper chore: add plugin targets Aug 12, 2025
@github-actions github-actions bot added the 🦾 CI/CD Continuous integration and deployment label Aug 12, 2025
@github-actions github-actions bot added the 📖 Project documentation improvements or additions to the project documentation label Aug 13, 2025
@BioPhoton BioPhoton marked this pull request as ready for review August 14, 2025 11:19
@BioPhoton BioPhoton requested a review from matejchalk August 14, 2025 11:22
@github-actions github-actions bot removed 📖 Project documentation improvements or additions to the project documentation 🔬 testing writing tests 🧩 nx-plugin labels Aug 16, 2025
Co-authored-by: Matěj Chalk <34691111+matejchalk@users.noreply.github.com>
matejchalk
matejchalk previously approved these changes Aug 21, 2025
@github-actions github-actions bot added 📖 Project documentation improvements or additions to the project documentation 🔬 testing writing tests 🧩 core 🧩 models labels Aug 21, 2025
@github-actions github-actions bot removed 📖 Project documentation improvements or additions to the project documentation 🔬 testing writing tests 🧩 core 🧩 models labels Aug 21, 2025
Copy link

nx-cloud bot commented Aug 21, 2025

View your CI Pipeline Execution ↗ for commit ff016c4

Command Status Duration Result
nx code-pushup --nx-bail -- compare --verbose -... ✅ Succeeded 10m 16s View ↗
nx code-pushup --nx-bail -- --verbose --no-prog... ✅ Succeeded 1m 37s View ↗
nx code-pushup --nx-bail -- print-config --verb... ✅ Succeeded 10m 7s View ↗

☁️ Nx Cloud last updated this comment at 2025-08-22 22:57:50 UTC

@github-actions github-actions bot added the 🔬 testing writing tests label Aug 22, 2025
@github-actions github-actions bot removed the 🔬 testing writing tests label Aug 22, 2025
Comment on lines 117 to 124
"@nx/vite:test": {
"cache": true,
"inputs": ["default", "^production"],
"inputs": ["test-vitest-inputs"],
"options": {
"passWithNoTests": true,
"watch": false
}
},
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I had to keep the executor defaults to keep e2e passing. ATM I have NO (uppercase intentional) clue why exactly, just some next things to verify. I already added this to the followup todos, just to keep a note here..

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