cli icon indicating copy to clipboard operation
cli copied to clipboard

Nx executor shouldn't assume autorun

Open matejchalk opened this issue 1 year ago • 2 comments

The code-pushup target needs to accept different commands so that the GitHub Action can use it - see https://github.com/code-pushup/github-action/issues/35#issuecomment-2248507862

  • [ ] remove autorun from executor command - https://github.com/code-pushup/cli/blob/main/packages/nx-plugin/src/executors/autorun/executor.ts#L26
    • default behaviour is the same because autorun is implicit, but we can append other commands like compare without interference
  • [ ] rename @code-pushup/nx-plugin:autorun to @code-pushup/nx-plugin:cli

matejchalk avatar Jul 25 '24 12:07 matejchalk

The problem I see here is we would either loose options parsing or have to implement very complicated schema fitting all commands.

I can try to come up with a PoC, maybe put basic core config and keep the options open for additional unspecified fields and document limitations etc.

BioPhoton avatar Jul 27 '24 00:07 BioPhoton

If it helps, these are commands the GitHub Action relies on or will rely on:

  • autorun (implicit, but could be explicit)
  • compare
  • print-config
  • will also need to use the new "merge-diffs" command

And these are the arguments used:

  • --persist.outputDir, --persist.filename and --persist.format
  • --config
  • --before and --after (only compare command)
  • whatever arguments the new "merge-diffs" command will define (e.g. something like --reports .code-pushup/**/report-diff.json)

matejchalk avatar Jul 27 '24 07:07 matejchalk