-
Notifications
You must be signed in to change notification settings - Fork 5
chore: Unify repo-wide scripts #297
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
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
faa8d9a to
4c6e056
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #297 +/- ##
=======================================
Coverage 97.39% 97.39%
=======================================
Files 87 87
Lines 11889 11889
Branches 554 629 +75
=======================================
Hits 11579 11579
Misses 303 303
Partials 7 7
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
4c6e056 to
02b9c1b
Compare
wschurman
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yarn integration and yarn typedoc seem to fail for me locally. I think once typedoc succeeds, yarn lint also fails since those files aren't excluded, but this one is hard to verify since I can't run typedoc.
|
Re: codecov. Based on a spot check, it looks like something is wrong with the new setup though it's hard to tell what. For example, from the report (https://app.codecov.io/gh/expo/entity/pull/297/indirect-changes) it says that L455 of |
02b9c1b to
8d00054
Compare
a0639b4 to
63d42ad
Compare
Ah, I deleted the empty I'll look further at the coverage differences. |
63d42ad to
850fa2b
Compare
8d00054 to
c7515f0
Compare
c7515f0 to
a0521b8
Compare
a0521b8 to
692d8c4
Compare
692d8c4 to
86c33eb
Compare
86c33eb to
7eb50b5
Compare
b3a299b to
460150f
Compare
460150f to
9270ae3
Compare
wschurman
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Few more issues I'm running into when testing this:
- When I run
yarn testfrom a subpackage directory (packages/entityfor example), I believe it is running all the tests from all packages? It should only run the tests from that package if possible. - When I run
yarn test src/__tests__/EnforcingEntityLoader-test.tsfrom thepackages/entitydirectory it also runs all the tests. It should only run that test if possible. - Ditto with integration tests.
|
(rest of the changes look good though!) |
9270ae3 to
4bdeee5
Compare
Ah, yep. Fixed now. |
4bdeee5 to
0351888
Compare
8573695 to
64057b6
Compare
f00539d to
cd9cf6c
Compare
a282900 to
1bf6c53
Compare
These are faster, and can pass arbitrary arguments to the underlying command, which allows repo-wide "watch" workflows.
1bf6c53 to
398852e
Compare
|
I finally fixed the coverage problem: I was not uploading all of the files which codecov uses! The total coverage is now consistent. |
wschurman
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
awesome stuff
Merge activity
|

Why
It's simpler, and usually faster (ctix is slower since it doesn't implement parallelization).
How
All existing commands are supported except for
yarn ctixin packages to rebuild the barrel file only of that package.typescript
Use project references. A root
tsconfig.jsonlists all the packages as references, each package'stsconfig.jsonextends the roottsconfig.base.json, and lists the workspace packages it depends on as references.In the root,
yarn buildbuilds all package which have out-of-date outputs. In a package,yarn tscbuilds that project, andyarn buildbuilds it and any packages it depends on.Because of interactions with ctix, the packages' tsconfig files specify
["src/**/*"]as their input, and.as their rootDir, meaning their output changes frombuildtobuild/src.These commands check and build all files, including tests, so instead of a separate set of "build" tsconfig files, the test files are added to .npmignore, so they aren't included in published packages.
eslint
Pretty straightforward, although the root
yarn lintcommand now lints all matching files in the repo.tests
From root,
yarn testandintegrationstart one jest process which runs all tests. Since a test will fail if its packaged dependencies aren't built, these commands runyarn build:all --noCheckfirst. With project references, this only builds out of date projects, and extremely fast when none of them are out of date.Individual package
testandintegrationcommands are equivalent to runningyarn <command> <path to a package>.ctix
Changing the root .ctirc file to reference each package, and changing the preface script to read the packages' names from their package.json.
Test Plan
I ran all these commands a bunch.
The coverage decreasing is from fixing an error in the way we were tracking coverage previously, note this part in the summary:
So after this commit, codecov included 12 more files in its coverage. I'm guessing these are files that are not loaded in the tests of their own package, but are in other packages.