code-pushup / cli

A CLI to run all kinds of code quality measurements to align your team with company goals
https://code-pushup.dev
MIT License
255 stars 14 forks source link

refactor: derive NPM dependencies from implicit dependencies of e2e project #810

Closed BioPhoton closed 1 month ago

BioPhoton commented 2 months ago

This PR refactors the new E2E setup and made the existing codebase more robust.

It includes:

It unfortunately also includes:

Implementation details

In my past attempts I was missing that params forwarding is off by default. Also the setup was too stable to make meaningful changes.

Targets are now correctly configures by using object to describe dependencies:

{
    "TARGET_NAME": {
        "dependsOn": [
            {
                "target": "DEPENDING_TARGET_NAME",
                "projects": "dependencies",
                "params": "forward"
            }
        ]
    }
}

Task graph before

cli-e2e nx-plugin-e2e create-cli-e2e
Screenshot 2024-08-30 at 18 23 50 Screenshot 2024-08-30 at 18 23 26 Screenshot 2024-08-30 at 18 23 36

Task graph after

cli-e2e nx-plugin-e2e create-cli-e2e
Screenshot 2024-08-30 at 18 12 00 Screenshot 2024-08-30 at 18 11 34 Screenshot 2024-08-30 at 18 12 07
github-actions[bot] commented 2 months ago

Code PushUp

🀨 Code PushUp report has both improvements and regressions – compared target commit 45ba7a3d3f0d466b6f07bfb39b5044c7f1866b3e with source commit 7b6d7daa73c41589b85588f92de7a413b7bc87f0.

πŸ•΅οΈ See full comparison in Code PushUp portal πŸ”

🏷️ Categories

🏷️ Category ⭐ Previous score ⭐ Current score πŸ”„ Score change
Performance πŸ”΄ 43 🟑 54 ↑ +10.8
Custom checks 🟑 67 🟑 67 –
Code coverage 🟑 90 🟑 90 –
Security 🟑 87 🟑 87 –
Updates 🟑 78 🟑 78 –
Accessibility 🟒 91 🟒 91 –
Best Practices 🟒 100 🟒 100 –
SEO 🟑 61 🟑 61 –
Bug prevention 🟒 100 🟒 100 –
Code style 🟒 99 🟒 99 –
πŸ‘ 1 group improved, πŸ‘ 4 audits improved, πŸ‘Ž 2 audits regressed, 12 audits changed without impacting score ## πŸ—ƒοΈ Groups | πŸ”Œ Plugin | πŸ—ƒοΈ Group | ⭐ Previous score | ⭐ Current score | πŸ”„ Score change | | :--------- | :---------- | :--------------: | :-------------: | :----------------------------------------------------------------: | | Lighthouse | Performance | πŸ”΄ 43 | 🟑 **54** | ![↑ +10.8](https://img.shields.io/badge/%E2%86%91%20%2B10.8-green) | 19 other groups are unchanged. ## πŸ›‘οΈ Audits | πŸ”Œ Plugin | πŸ›‘οΈ Audit | πŸ“ Previous value | πŸ“ Current value | πŸ”„ Value change | | :--------- | :------------------------------------------- | :----------------------------: | :--------------------------------: | :------------------------------------------------------------------------------------: | | Lighthouse | Eliminate render-blocking resources | 🟨 Potential savings of 0Β ms | πŸŸ₯ **Potential savings of 500Β ms** | ![↑ +βˆžβ€‰%](https://img.shields.io/badge/%E2%86%91%20%2B%E2%88%9E%E2%80%89%25-red) | | Lighthouse | Reduce unused CSS | 🟨 Potential savings of 70Β KiB | πŸŸ₯ **Potential savings of 70Β KiB** | ![↑ +βˆžβ€‰%](https://img.shields.io/badge/%E2%86%91%20%2B%E2%88%9E%E2%80%89%25-red) | | Lighthouse | Largest Contentful Paint | πŸŸ₯ 4.3Β s | 🟨 **3.3Β s** | ![↓ βˆ’23.6 %](https://img.shields.io/badge/%E2%86%93%20%E2%88%9223.6%E2%80%89%25-green) | | Lighthouse | First Contentful Paint | πŸŸ₯ 3.4Β s | 🟨 **2.8Β s** | ![↓ βˆ’18.4 %](https://img.shields.io/badge/%E2%86%93%20%E2%88%9218.4%E2%80%89%25-green) | | Lighthouse | Speed Index | πŸŸ₯ 6.9Β s | 🟨 **5.7Β s** | ![↓ βˆ’17.6 %](https://img.shields.io/badge/%E2%86%93%20%E2%88%9217.6%E2%80%89%25-green) | | Lighthouse | First Meaningful Paint | 🟨 3.4Β s | 🟨 **2.8Β s** | ![↓ βˆ’18.4 %](https://img.shields.io/badge/%E2%86%93%20%E2%88%9218.4%E2%80%89%25-green) | | Lighthouse | Avoids enormous network payloads | 🟩 Total size was 1,799Β KiB | 🟩 **Total size was 1,804Β KiB** | ![↑ +0.3 %](https://img.shields.io/badge/%E2%86%91%20%2B0.3%E2%80%89%25-gray) | | Lighthouse | Total Blocking Time | πŸŸ₯ 8,820Β ms | πŸŸ₯ **6,230Β ms** | ![↓ βˆ’29.3 %](https://img.shields.io/badge/%E2%86%93%20%E2%88%9229.3%E2%80%89%25-gray) | | Lighthouse | Minimizes main-thread work | πŸŸ₯ 21.5Β s | πŸŸ₯ **19.4Β s** | ![↓ βˆ’9.8 %](https://img.shields.io/badge/%E2%86%93%20%E2%88%929.8%E2%80%89%25-gray) | | Lighthouse | JavaScript execution time | πŸŸ₯ 9.9Β s | πŸŸ₯ **9.2Β s** | ![↓ βˆ’7.5 %](https://img.shields.io/badge/%E2%86%93%20%E2%88%927.5%E2%80%89%25-gray) | | Lighthouse | Max Potential First Input Delay | πŸŸ₯ 2,200Β ms | πŸŸ₯ **2,910Β ms** | ![↑ +32 %](https://img.shields.io/badge/%E2%86%91%20%2B32%E2%80%89%25-gray) | | Lighthouse | Uses efficient cache policy on static assets | 🟨 27 resources found | 🟨 **27 resources found** | ![↑ +0.1 %](https://img.shields.io/badge/%E2%86%91%20%2B0.1%E2%80%89%25-gray) | | Lighthouse | Time to Interactive | πŸŸ₯ 16.2Β s | πŸŸ₯ **15.9Β s** | ![↓ βˆ’1.5 %](https://img.shields.io/badge/%E2%86%93%20%E2%88%921.5%E2%80%89%25-gray) | | Lighthouse | Metrics | 🟩 100% | 🟩 **100%** | ![↓ βˆ’1.5 %](https://img.shields.io/badge/%E2%86%93%20%E2%88%921.5%E2%80%89%25-gray) | | Lighthouse | Server Backend Latencies | 🟩 100Β ms | 🟩 **250Β ms** | ![↑ +147.7 %](https://img.shields.io/badge/%E2%86%91%20%2B147.7%E2%80%89%25-gray) | | Lighthouse | Network Round Trip Times | 🟩 60Β ms | 🟩 **20Β ms** | ![↓ βˆ’66.2 %](https://img.shields.io/badge/%E2%86%93%20%E2%88%9266.2%E2%80%89%25-gray) | | Lighthouse | Initial server response time was short | 🟩 Root document took 420Β ms | 🟩 **Root document took 410Β ms** | ![↓ βˆ’1.6 %](https://img.shields.io/badge/%E2%86%93%20%E2%88%921.6%E2%80%89%25-gray) | | Lighthouse | Avoids an excessive DOM size | πŸŸ₯ 2,254 elements | πŸŸ₯ **2,255 elements** | ![↑ +0.1 %](https://img.shields.io/badge/%E2%86%91%20%2B0.1%E2%80%89%25-gray) | 495 other audits are unchanged.