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

Adds CircleCI configuration #39

Merged
merged 6 commits into from
Jun 20, 2019

Conversation

bg451
Copy link
Member

@bg451 bg451 commented Jun 18, 2019

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.jsons 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.

Brandon Gonzalez added 3 commits June 18, 2019 13:07
* Add script to checksum all packages package.json, save cache based on this.

* Use yarn with lerna
@bg451 bg451 changed the title Bg/add circleci Adds CircleCI configuration Jun 18, 2019
- ./yarn.lock
- ./packages/*/node_modules
- ./packages/*/yarn.lock
- run:
Copy link
Member

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?

Copy link
Member

@mayurkale22 mayurkale22 left a 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" }}
Copy link
Member

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.

Copy link
Member

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
Copy link
Member

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?

Copy link
Member

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.

Copy link
Member

Choose a reason for hiding this comment

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

command: yarn run compile
- run:
name: Test
command: yarn run test
Copy link
Member

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?

Copy link
Member

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.

@mayurkale22
Copy link
Member

Is this ready to merge?

@mayurkale22 mayurkale22 merged commit e712b45 into open-telemetry:master Jun 20, 2019
@mayurkale22 mayurkale22 mentioned this pull request Jun 20, 2019
pichlermarc pushed a commit to dynatrace-oss-contrib/opentelemetry-js that referenced this pull request Dec 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants