e-square-io / nx-github-actions

A set of Github Actions for NX workspaces
MIT License
30 stars 6 forks source link

fix(utils): support new and old custom hashers #42

Closed ronnetzer closed 2 years ago

ronnetzer commented 2 years ago

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

[x] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Other... Please describe:

What is the current behavior?

currently NX is having a new way of invoking custom hashers (its still experimental). the action only supports the new one which breaks the action on older nx workspaces

Issue Number: N/A

What is the new behavior?

supporting both ways by checking the amount of arguments needed for the customHasher function

Does this PR introduce a breaking change?

[ ] Yes
[x] No
nx-cloud[bot] commented 2 years ago

☁️ Nx Cloud Report

CI ran the following commands for commit c3c0bb01d43bb9daa4c3123925269df2dd4800eb. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch


✅ Successfully ran 4 targets - [`nx run-many --projects=nx-affected-matrix,nx-distributed-task --skip-nx-cache=false --target=build --parallel=3 --with-deps`](https://nx.app/runs/j6H7NX4irn6) - [`nx run-many --projects=nx-affected-matrix,nx-distributed-task --skip-nx-cache=false --target=test --parallel=3 --with-deps=false`](https://nx.app/runs/Xtq8FHhuELO) - [`nx run-many --projects=nx-distributed-task,nx-affected-matrix --skip-nx-cache=false --target=build --parallel=3 --scan --with-deps`](https://nx.app/runs/46X43EuBfcG) - [`nx run-many --projects=utils,nx-distributed-task,nx-affected-matrix --skip-nx-cache=false --target=test --parallel=3 --scan --with-deps=false`](https://nx.app/runs/Y4i7ZtXqydL)

Sent with 💌 from NxCloud.

codecov[bot] commented 2 years ago

Codecov Report

Merging #42 (c3c0bb0) into main (9596455) will increase coverage by 0.30%. The diff coverage is n/a.

@@            Coverage Diff             @@
##             main      #42      +/-   ##
==========================================
+ Coverage   88.12%   88.42%   +0.30%     
==========================================
  Files          15       15              
  Lines         362      363       +1     
  Branches       50       51       +1     
==========================================
+ Hits          319      321       +2     
  Misses         39       39              
+ Partials        4        3       -1     
Flag Coverage Δ
nx-affected-matrix 95.91% <ø> (ø)
nx-distributed-task 100.00% <ø> (ø)
utils 82.14% <ø> (+0.52%) :arrow_up:
Impacted Files Coverage Δ
packages/utils/src/lib/inputs.ts 62.50% <0.00%> (+0.68%) :arrow_up:
packages/utils/src/lib/cache.ts 98.21% <0.00%> (+1.78%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 7c6ef1c...c3c0bb0. Read the comment docs.