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

Husky #944

Merged
merged 2 commits into from
Feb 8, 2023
Merged

Husky #944

merged 2 commits into from
Feb 8, 2023

Conversation

mkholjuraev
Copy link
Contributor

Description

Associated Jira ticket: # (issue)

This is nice to have. It introduces husky to run tests before each commit is created.

How to test the PR

Create any commit and observe that tests are run directly after it got created.

Before the change

After the change

Dependent work link

Checklist:

  • The commit message has the Jira ticket linked
  • PR has a short description
  • Screenshots before and after the change are added
  • Tests for the changes have been added
  • README.md is updated if necessary
  • Needs additional dependent work

@mkholjuraev mkholjuraev requested a review from a team as a code owner January 3, 2023 20:17
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npm run test && npm run test:ct && npm run lint
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Woah, do you really want to run component tests too? :-D folks will be crazy waiting for tests to complete. better just leave it on per-pull-request CI?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think everyone runs component tests before pushing to CI. Usually what I do is run the tests to check if tests are passing, if not update tests&snapshots and then push to master.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With this, you will be sure that your PR does not fail tests&lint once and always after you create a PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also you can easly disable husky while creating a WIP commit with -n or --no-verify

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, I see, still sometimes you'd need to commit quickly, but the flag should help. lgtm 👍🏼

@gkarat gkarat requested a review from a team January 6, 2023 14:56
@mkholjuraev mkholjuraev merged commit 89bb482 into RedHatInsights:master Feb 8, 2023
@mkholjuraev
Copy link
Contributor Author

🎉 This PR is included in version 1.59.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants