Skip to content

ci: invalidate nx cloud cache for different operating system #1080

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 1 commit into from
Aug 25, 2025

Conversation

matejchalk
Copy link
Collaborator

@matejchalk matejchalk commented Aug 22, 2025

We run CI jobs on different operating systems to ensure platform compatibility. Now that Nx Cloud is in play, though, we need to make sure cache isn't reused between them - the same source code may pass on Linux and fail on Windows, for example.

I've set the os.platform() value (along with node -v) as a shared global, so that Nx uses this info in its cache keys. I've tested the command on both Linux and Windows to make sure it works everywhere (not easy to figure out, different shells, quote handling etc. 😅), came up with node -e "console.log(require('os').platform())".

Copy link

nx-cloud bot commented Aug 22, 2025

View your CI Pipeline Execution ↗ for commit 7b5c5be

Command Status Duration Result
nx code-pushup -- compare --verbose --before=/h... ✅ Succeeded 9s View ↗
nx code-pushup -- --verbose --no-progress --per... ✅ Succeeded 9m 1s View ↗
nx code-pushup -- print-config --verbose --outp... ✅ Succeeded 8s View ↗

☁️ Nx Cloud last updated this comment at 2025-08-22 17:11:16 UTC

Copy link

pkg-pr-new bot commented Aug 22, 2025

Open in StackBlitz

@code-pushup/ci

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

@code-pushup/cli

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

@code-pushup/create-cli

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

@code-pushup/models

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

@code-pushup/nx-plugin

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

@code-pushup/core

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

@code-pushup/coverage-plugin

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

@code-pushup/eslint-plugin

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

@code-pushup/js-packages-plugin

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

@code-pushup/jsdocs-plugin

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

@code-pushup/lighthouse-plugin

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

@code-pushup/typescript-plugin

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

@code-pushup/utils

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

commit: 7b5c5be

@matejchalk matejchalk added the 🦾 CI/CD Continuous integration and deployment label Aug 22, 2025
Copy link

github-actions bot commented Aug 22, 2025

Code PushUp

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

🕵️ See full comparison in Code PushUp portal 🔍

🏷️ Categories

🏷️ Category ⭐ Previous score ⭐ Current score 🔄 Score change
Performance 🔴 34 🔴 32 ↓ −2.5
Code coverage 🟢 91 🟢 91
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
Documentation 🔴 23 🔴 23
👎 1 group regressed, 👍 1 audit improved, 👎 3 audits regressed, 13 audits changed without impacting score

🗃️ Groups

🔌 Plugin 🗃️ Group ⭐ Previous score ⭐ Current score 🔄 Score change
Lighthouse Performance 🔴 34 🔴 32 ↓ −2.5

20 other groups are unchanged.

🛡️ Audits

🔌 Plugin 🛡️ Audit 📏 Previous value 📏 Current value 🔄 Value change
Lighthouse Speed Index 🟥 6.9 s 🟥 8.1 s ↑ +16.7 %
Lighthouse Total Blocking Time 🟥 2,360 ms 🟥 6,410 ms ↑ +171.1 %
Lighthouse Time to Interactive 🟥 17.1 s 🟥 20.5 s ↑ +19.8 %
Lighthouse First Contentful Paint 🟥 3.1 s 🟥 3.0 s ↓ −1.9 %
Lighthouse Minimizes main-thread work 🟥 11.8 s 🟥 19.1 s ↑ +61.9 %
Lighthouse Avoids enormous network payloads 🟩 Total size was 2,656 KiB 🟩 Total size was 2,651 KiB ↓ −0.2 %
Lighthouse JavaScript execution time 🟥 5.1 s 🟥 9.4 s ↑ +82.7 %
Lighthouse Metrics 🟩 100% 🟩 100% ↑ +19.8 %
Lighthouse Uses efficient cache policy on static assets 🟨 30 resources found 🟨 29 resources found ↓ −0.1 %
Lighthouse Largest Contentful Paint 🟥 11.5 s 🟥 12.2 s ↑ +5.5 %
Lighthouse Max Potential First Input Delay 🟥 1,340 ms 🟥 1,930 ms ↑ +44.9 %
Lighthouse Server Backend Latencies 🟩 540 ms 🟩 160 ms ↓ −70.9 %
Lighthouse Reduce unused CSS 🟥 Potential savings of 116 KiB 🟥 Potential savings of 116 KiB ↓ −23.1 %
Lighthouse Remove duplicate modules in JavaScript bundles 🟥 Potential savings of 95 KiB 🟥 Potential savings of 100 KiB ↓ −36.2 %
Lighthouse Reduce unused JavaScript 🟥 Potential savings of 591 KiB 🟥 Potential savings of 614 KiB ↑ +16.7 %
Lighthouse Initial server response time was short 🟩 Root document took 590 ms 🟩 Root document took 550 ms ↓ −6 %
Lighthouse Network Round Trip Times 🟩 70 ms 🟩 40 ms ↓ −42.5 %

593 other audits are unchanged.

BioPhoton
BioPhoton previously approved these changes Aug 22, 2025
Copy link
Collaborator

@BioPhoton BioPhoton left a comment

Choose a reason for hiding this comment

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

Like it!

@github-actions github-actions bot removed the 🦾 CI/CD Continuous integration and deployment label Aug 22, 2025
@matejchalk matejchalk requested a review from BioPhoton August 22, 2025 17:01
@BioPhoton
Copy link
Collaborator

I've tested the command on both Linux and Windows

I'm curious how you tested it.

Copy link
Collaborator

@BioPhoton BioPhoton left a comment

Choose a reason for hiding this comment

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

Added a question

Copy link
Collaborator

@BioPhoton BioPhoton left a comment

Choose a reason for hiding this comment

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

LTGM

@matejchalk matejchalk merged commit b08a9a7 into main Aug 25, 2025
18 of 19 checks passed
@matejchalk matejchalk deleted the nx-cloud-os-cache branch August 25, 2025 08:30
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.

3 participants