-
Notifications
You must be signed in to change notification settings - Fork 835
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
Changes from all commits
23e64f6
a0e5554
d19eb5c
4b86d79
98f25ea
95c5e37
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#! /bin/sh | ||
# | ||
# Usage: checksum.sh filename | ||
# | ||
# checksum.sh computes the checksum of the repo's top level `package.json` | ||
# and `package.json` files in package/, putting the hashes into a file in | ||
# alphabetical order. Must be run at the top level of the repository. | ||
|
||
|
||
if [ -z $1 ]; then | ||
echo "Usage: checksum.sh filename" | ||
exit 1 | ||
fi | ||
|
||
FILE=$1 | ||
|
||
# remove existing file | ||
if [ -f $FILE ]; then | ||
rm $FILE | ||
fi | ||
|
||
openssl md5 package.json >> $FILE | ||
|
||
find packages/*/package.json | xargs -I{} openssl md5 {} >> $FILE | ||
|
||
sort -o $FILE $FILE |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
version: 2 | ||
|
||
jobs: | ||
build: | ||
docker: | ||
- image: circleci/node:12 | ||
steps: | ||
- checkout | ||
- run: | ||
name: Create Checksum | ||
command: sh .circleci/checksum.sh /tmp/checksums.txt | ||
- restore_cache: | ||
keys: | ||
- 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 commentThe reason will be displayed to describe this comment to others. Learn more. Should this be There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Another option is to add There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
||
- save_cache: | ||
key: npm-cache-{{ checksum "/tmp/checksums.txt" }} | ||
paths: | ||
- ./node_modules | ||
- ./yarn.lock | ||
- ./packages/*/node_modules | ||
- ./packages/*/yarn.lock | ||
- run: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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): |
||
name: Lint | ||
command: yarn run check | ||
- run: | ||
name: Compile | ||
command: yarn run compile | ||
- run: | ||
name: Test | ||
command: yarn run test | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 commentThe 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. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
{ | ||
"lerna": "3.13.4", | ||
"npmClient": "yarn", | ||
"packages": [ | ||
"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.
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.