Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add husky pre-commit and checks #912

Merged
merged 13 commits into from
Sep 27, 2024

Conversation

JeffGreiner-eaton
Copy link
Collaborator

@JeffGreiner-eaton JeffGreiner-eaton commented Sep 25, 2024

Fixes BLUI-6038.

Changes proposed in this Pull Request:

  • added husky with pre-commit
  • removed old enzyme configs that were not in use
  • updated jest version and set jest config to include coverage thresholds
  • pre-commit will run yarn initialize && yarn install:dependencies && yarn prettier:check && yarn lint && cd components && yarn test --coverage

Screenshots / Screen Recording (if applicable)

husky-pre-commit.mov

To Test:

  • clone fresh copy git clone https://github.com/etn-ccis/blui-react-component-library.git
  • git checkout feature/blui-6038-husky-pre-commit
  • run yarn install:dependencies
  • make a change somewhere to generate change set (readme)
  • depending on your normal commits

a.) use the vs code source control panel to stage and commit.
(the husky pre-commit runs in the background and when complete your commit will compete)

OR

b.) use the terminal git add . && git commit -m 'my commit' (running in terminal will display what pre-commit runs)

Next test

  • edit the jest.config file in components directory and update line 10 to be "lines": 90

image

  • make additional change in readme
  • repeat step (a) from above and when vs code modal opens select open git log.
    Git yarn install v1 22 22
    Pasted Graphic 4

OR

  • repeat step (b) from above and view output
    srccoreListItemTagListItenTag test tsx (9 678 s)
    Test Suites 13 passed, 13 total

Any specific feedback you are looking for?

@github-actions github-actions bot added the brightlayer-ui Used to identify Brightlayer UI platform issues for easy filtering label Sep 25, 2024
Copy link

codecov bot commented Sep 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.85%. Comparing base (36aa6dc) to head (c9ac902).
Report is 14 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #912      +/-   ##
==========================================
- Coverage   83.76%   80.85%   -2.92%     
==========================================
  Files          58       47      -11     
  Lines        1226     1238      +12     
  Branches      154      156       +2     
==========================================
- Hits         1027     1001      -26     
- Misses        100      136      +36     
- Partials       99      101       +2     
Flag Coverage Δ
unittests 80.85% <ø> (-2.92%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

github-actions bot commented Sep 25, 2024

Visit the preview URL for this PR (updated for commit c9ac902):

https://blui-react-docs--pr912-feature-blui-6038-hu-lbhwh6zn.web.app

(expires Fri, 27 Sep 2024 17:26:06 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 34d39fa5aab0ea0cf95074e8e76f68829e7a8c65

@JeffGreiner-eaton JeffGreiner-eaton marked this pull request as ready for review September 25, 2024 17:26
@ektaghag-eaton
Copy link
Contributor

Working fine 👍
Screenshot 2024-09-26 at 12 54 58 PM

@JeffGreiner-eaton JeffGreiner-eaton merged commit cff29ad into dev Sep 27, 2024
17 checks passed
@JeffGreiner-eaton JeffGreiner-eaton deleted the feature/blui-6038-husky-pre-commit branch September 27, 2024 11:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
brightlayer-ui Used to identify Brightlayer UI platform issues for easy filtering
Development

Successfully merging this pull request may close these issues.

2 participants