Skip to content
This repository has been archived by the owner on Mar 12, 2020. It is now read-only.

[RFC] Change yarn test to run all types of checks that CI would also run #934

Closed
alloy opened this issue Jan 9, 2018 · 11 comments
Closed

Comments

@alloy
Copy link
Contributor

alloy commented Jan 9, 2018

More than once I have pushed code where I forgot to run one of the various test tasks. So rather than yarn test being a synonym for yarn jest, we can have it do yarn type-check && yarn lint && yarn relay && yarn jest. Thoughts?

@alloy
Copy link
Contributor Author

alloy commented Jan 9, 2018

In the past we would have had a task like yarn ci that would run all of these and would be the task that actually got invoked by CI, but I’m assuming we list them out separately in the Circle config because Circle will then be able to have nice UI for each of those steps (?).

@sarahscott
Copy link
Contributor

I think this is a good idea but in my experience, sometimes yarn ci passes locally and not in Circle, and I think it's always been linting or prettier-related.

@alloy
Copy link
Contributor Author

alloy commented Jan 9, 2018

@sarahscott To be fair, isn’t that because you maybe don’t have the git commit hook setup to automatically run the linter/prettier?

@mennenia
Copy link
Contributor

mennenia commented Jan 9, 2018

Yes! 🙌 I agree whole heartedly

@alloy
Copy link
Contributor Author

alloy commented Jan 9, 2018

@sarahscott Maybe there’s a way to also run prettier and rather than write changes exit with a failure status? If so, then that could be added to the yarn test task as well, assuming it doesn’t take too long to run.

@sarahscott
Copy link
Contributor

@alloy I ran prettier and linter manually, so it wouldn't have been related to a git hook.

@alloy
Copy link
Contributor Author

alloy commented Jan 9, 2018

@sarahscott Next time that it happens, try to nail down how that discrepancy could’ve occurred and then let’s fix it permanently.

@l2succes
Copy link
Contributor

l2succes commented Jan 9, 2018

No strong opinion, I've been using yarn ci for that purpose and since yarn test would essentially be the same set of commands minus yarn prettier-project I'm fine with it.

@orta
Copy link
Contributor

orta commented Jan 9, 2018

This repo is behind culturally in how we manage git hooks - #905

In Danger and Peril I run all of the tests/linters before a push, Emission should do this too. Considering how easy/fast it is to run this stuff and how much time it takes to get that eventual feedback after the PR then CI results.

@orta
Copy link
Contributor

orta commented Jan 9, 2018

I’m assuming we list them out separately in the Circle config because Circle will then be able to have nice UI for each of those steps.

Yep

@katarinabatina
Copy link
Contributor

tracked in Jira https://artsyproduct.atlassian.net/browse/IN-15

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

No branches or pull requests

6 participants