-
Notifications
You must be signed in to change notification settings - Fork 825
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Adds initial circle config file * Add script to checksum all packages package.json, save cache based on this. * Use yarn with lerna * remove --no-ci option * slightly clarify documentation * Adds lint step
- Loading branch information
1 parent
802182e
commit e712b45
Showing
3 changed files
with
60 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
- save_cache: | ||
key: npm-cache-{{ checksum "/tmp/checksums.txt" }} | ||
paths: | ||
- ./node_modules | ||
- ./yarn.lock | ||
- ./packages/*/node_modules | ||
- ./packages/*/yarn.lock | ||
- run: | ||
name: Lint | ||
command: yarn run check | ||
- run: | ||
name: Compile | ||
command: yarn run compile | ||
- run: | ||
name: Test | ||
command: yarn run test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
{ | ||
"lerna": "3.13.4", | ||
"npmClient": "yarn", | ||
"packages": [ | ||
"packages/*" | ||
], | ||
|