Overview

Follow-up for #3450307: CI: use template's `eslint` job to validate YML and JS, add new `UI eslint` job for UI's TypeScript.

@bnjmnm raised 2 DX/velocity concerns while he was working on #3452512: Add component instance edit form to contextual panel:

  1. #3450307: CI: use template's `eslint` job to validate YML and JS, add new `UI eslint` job for UI's TypeScript introduced the UI eslint CI job. It does not provide clear errors for TS failures, due to us running npm run lint in that CI job and:
        "build": "tsc --noEmit && vite build",
    …
        "lint:eslint": "eslint . --max-warnings=0",
        "lint": "npm run type-check && npm run lint:eslint",
    
  2. Furthermore, only the Cypress CI job is currently actually building the UI (npm run build). That makes no sense: that CI job should not even be triggered if the build fails — there should be an explicit failure for that instead.

User interface changes

None.

CommentFileSizeAuthor
#3 Screenshot 2024-07-11 at 11.33.25 AM.png253.27 KBwim leers
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

Wim Leers created an issue. See original summary.

wim leers’s picture

StatusFileSize
new253.27 KB

A TypeScript error now results in NO more linting, NOR Cypress testing:

wim leers’s picture

Assigned: wim leers » bnjmnm
Status: Active » Needs review

And now the Cypress CI job is faster! It no longer runs npm run build, not even npm install — because it receives all that work from the earlier UI CI job 👍

Bonus: #3460778: CI: do not run PHP-only jobs if an MR only changes the UI will improve the DX for JS UI-only changes further 😊

wim leers’s picture

Title: CI: improve `UI eslint` job does not provide clear errors for TS failures, does not report eslint violations » CI: improve UI-related CI jobs:`UI eslint` obscures TypeScript Compiler errors, `npm run build` runs too late

I see now the issue title was wrong — but the summary was right 🙈

  • Wim Leers committed afcf4a9e on 0.x
    Issue #3460760 by Wim Leers: CI: improve UI-related CI jobs:`UI eslint`...
wim leers’s picture

Assigned: bnjmnm » Unassigned
Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.