ojkelly / yarn.build

Build šŸ›  and Bundle šŸ“¦ your local workspaces. Like Bazel, Buck, Pants and Please but for Yarn Berry. Build any language, mix javascript, typescript, golang and more in one polyglot repo. Ship your bundles to AWS Lambda, Docker, or any nodejs runtime.
https://yarn.BUILD
MIT License
325 stars 28 forks source link

Adding `--ignore-dependencies`, `--fail-fast`, improve `--continue-on-error`, and improving CI report #225

Closed ojkelly closed 2 years ago

ojkelly commented 2 years ago

Adding --ignore-dependencies and setting it as the default for running tests. Tests in one package cannot depend on the output of tests in another package, and there seems to be universal agreement on this. So it follows that tests can be run in full parallel.

Adding --fail-fast and fixing up --continue-on-error, so that jobs aren't killed part way through unless --fail-fast is set. When --continue-on-error is set, a failing job will not prevent subsequent jobs from running.

Improved the CI run report.

This adds depth information to the run order, as well as correcting as issue where the first item of a new level, was shown on the wrong level.

Using color to make the realtime output clearer for success and failures. As well as printing out the runtime per job, not the runtime of that job since the start of the whole run.

Also printing out the cumulative, saved and wall time in the final run report.

[ Run Order ]-------------------------------------------------------------------
ā”œā”€[0] packages/examples/words/adipiscing
ā”œā”€[0] packages/examples/words/amet
ā”œā”€[0] packages/examples/words/consectetur
ā”œā”€[0] packages/examples/words/dolor
ā”œā”€[0] packages/examples/words/elit
ā”œā”€[0] packages/examples/words/ipsum
ā”œā”€[0] packages/examples/words/lorem
ā”œā”€[0] packages/examples/words/sit
ā”œā”€[0] packages/plugins/shared
ā””ā”€[0] packages/plugins/plugin-package-yaml
  ā”œā”€[1] packages/examples/phrases/in-hac
  ā”œā”€[1] packages/examples/phrases/nullam-risus
  ā”œā”€[1] packages/plugins/plugin-build
  ā””ā”€[1] packages/plugins/plugin-bundle
    ā”œā”€[2] packages/examples/phrases/lorem-ipsum
    ā””ā”€[2] packages/plugins/plugin-test
      ā”œā”€[3] packages/examples/lorem-ipsum
      ā”œā”€[3] packages/examples/lorem-ipsum-docker
      ā””ā”€[3] packages/plugins/plugin-all

[ Run / Command: build / Concurrency: 8 ]---------------------------------------
āœ… packages/examples/words/consectetur                                     2.96s
āœ… packages/examples/words/dolor                                           3.14s
āœ… packages/examples/words/ipsum                                           3.46s
āœ… packages/examples/words/elit                                            3.55s
āœ… packages/examples/words/adipiscing                                      3.55s
āœ… packages/examples/words/lorem                                           3.78s
āœ… packages/examples/words/amet                                            3.78s
āœ… packages/examples/words/sit                                             3.78s
āœ… packages/plugins/shared                                                 2.15s
āŒ packages/examples/phrases/in-hac                         (exit code: 2) 1.79s
āœ… packages/examples/phrases/nullam-risus                                  1.79s
ā© packages/examples/phrases/lorem-ipsum                                      --
ā© packages/examples/lorem-ipsum                                              --
ā© packages/examples/lorem-ipsum-docker                                       --
āœ… packages/plugins/plugin-package-yaml                                    3.15s
āœ… packages/plugins/plugin-build                                           3.09s
ā© packages/plugins/plugin-test                                               --
āœ… packages/plugins/plugin-bundle                                          3.09s
ā© packages/plugins/plugin-all                                                --

[ build for All ]---------------------------------------------------------------

--[ Output: packages/examples/phrases/in-hac ]----------------------------------
src/index.ts:5:1 - error TS2304: Cannot find name 'dd'.
5 dd;
  ~~
Found 1 error in src/index.ts:5

[ Summary ]---------------------------------------------------------------------
Success: 13
Up to date: 0
Fail: 1
Skipped: 5
Excluded: 0
Total: 19
---
Cumulative: (cpu): 43.11s
Saved: 34.57s
Runtime (wall): 8.53s
[ build finished with 1 errors ]----------------------------------[ yarn.build ]

āž¤ YN0009: Build failed
āž¤ YN0000: Failed with errors in 8s 541ms
ojkelly commented 2 years ago

This fixes #214