-
Notifications
You must be signed in to change notification settings - Fork 846
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
Adds CircleCI configuration #39
Conversation
* Add script to checksum all packages package.json, save cache based on this. * Use yarn with lerna
- ./yarn.lock | ||
- ./packages/*/node_modules | ||
- ./packages/*/yarn.lock | ||
- run: |
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.
Can you please add a step for lints (and checks for formatting problems): yarn run check
?
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.
LGTM, could you please open an issue to configure workflows later?
command: sh .circleci/checksum.sh /tmp/checksums.txt | ||
- restore_cache: | ||
keys: | ||
- npm-cache-{{ checksum "/tmp/checksums.txt" }} |
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.
This should probably be done by package instead, which will be a lot faster since only the modules for that package will be redownloaded.
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.
Ignore this comment, just saw in the PR it's simple on purpose.
- npm-cache-{{ checksum "/tmp/checksums.txt" }} | ||
- run: | ||
name: Install Dependencies | ||
command: yarn install |
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.
Should this be lerna bootstrap
instead? How are individual packages installed and linked together with yarn install
?
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.
Another option is to add "postinstall": "yarn run bootstrap"
script.
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.
Looks like we already have this option: https://github.com/open-telemetry/opentelemetry-js/blob/master/package.json#L9
command: yarn run compile | ||
- run: | ||
name: Test | ||
command: yarn run test |
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.
Tests should be parallelized by package. Is there a way to install dependencies only for select packages?
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.
Ignore this comment, just saw in the PR it's simple on purpose.
Is this ready to merge? |
This PR adds continuous integration via circleci for issue #8.
Due to the package layout, I added a simple script to checksum all subpackage
package.json
s so that we can invalidate the cache whenever a dependency changes. I opted to not set up workflows considering that the repository is still pretty simple and I imagine build/test times will be short for a while. I'll happily spend more time on it when testing parallelization is needed. For an example of the build, see here.Before merging this PR, there needs to be consensus #14 since the config currently uses yarn. npm also has a slightly different flag set.