Skip to content

stop using gulp as a test task runner #10306

Description

@maribethb

Check for duplicates

  • I have searched for similar issues before opening a new one.

Description

We're using gulp as effectively a task runner in npm run test which is not a thing gulp is particularly good at doing. It has caused numerous problems repeatedly:

  • gulpfiles are difficult to maintain/modify/reason about
  • we've been bit by multiple errors that get swallowed and are a pain to debug because the actual issue is swallowed by gulp somewhere, leading to layers of additional logging that are just adding more potential spots for confusion and failure
  • results are not cacheable with nx due to the way we've set things up so currently the blockly tests have to run after all the plugin tests
  • lint has special handling to make it not run twice in CI

gulp is not a task runner. we basically rolled our own so that we could do things like have all the tests run and not fail until the end. however, now we're actually using a task runner, nx, which can do a better job for us.

steps:

  1. make each task its own named npm script
  2. accurately declare the nx graph to name which tasks depend on others, their inputs and outputs so they can be cached correctly, etc. needs care to get right to avoid cache problems.
  3. run everything with npx nx run-many to run all the commands at once. use --nx-bail=false to have it keep running even after something fails.

things to be aware of:

  • if we have cacheing enabled in ci, make sure the cache is actually invalidated in between running on node versions 22 and 24
  • nx doesn't have the cute github step summary we hand-made, so either get used to nx's output or re-write this or see if someone has a plugin for this
  • using colons in the script names forces us to use the project/target flags instead of nx's default project:target syntax so it might be better to just rename the scripts while we're here.

Reproduction steps

Priority

No response

Stack trace

Screenshots

No response

Browsers

No response

Metadata

Metadata

Assignees

Labels

status: triageIssues awaiting triage by a Blockly team member

Type

Projects

Status
Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions