forked from Shopify/slate
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Thomas Kelly
committed
Sep 8, 2017
1 parent
8f4c51a
commit 4698035
Showing
3 changed files
with
144 additions
and
25 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,143 @@ | ||
version: 2 | ||
jobs: | ||
build: | ||
docker: | ||
- image: circleci/node:latest | ||
steps: | ||
- checkout | ||
- restore_cache: | ||
keys: | ||
- root-cache-{{ checksum "package-lock.json" }} | ||
- root-cache | ||
- restore_cache: | ||
keys: | ||
- slate-tools-cache-{{ checksum "./packages/slate-tools/package-lock.json" }} | ||
- slate-tools-cache | ||
- restore_cache: | ||
keys: | ||
- slate-theme-cache-{{ checksum "./packages/slate-theme/package-lock.json" }} | ||
- slate-theme-cache | ||
- restore_cache: | ||
keys: | ||
- slate-cli-cache-{{ checksum "./packages/slate-cli/package-lock.json" }} | ||
- slate-cli-cache | ||
- run: | ||
name: Bootstrap packages | ||
command: npm run bootstrap | ||
- save-cache: | ||
key: root-cache-{{ checksum "package-lock.json" }} | ||
paths: | ||
- ./node_modules | ||
- save-cache: | ||
key: root-cache | ||
paths: | ||
- ./node_modules | ||
- save-cache: | ||
key: slate-tools-cache-{{ checksum "./packages/slate-tools/package-lock.json" }} | ||
paths: | ||
- ./packages/slate-tools/node_modules | ||
- save-cache: | ||
key: slate-tools-cache | ||
paths: | ||
- ./packages/slate-tools/node_modules | ||
- save-cache: | ||
key: slate-theme-cache-{{ checksum "./packages/slate-theme/package-lock.json" }} | ||
paths: | ||
- ./packages/slate-theme/node_modules | ||
- save-cache: | ||
key: slate-theme-cache | ||
paths: | ||
- ./packages/slate-theme/node_modules | ||
- save-cache: | ||
key: slate-cli-cache-{{ checksum "./packages/slate-cli/package-lock.json" }} | ||
paths: | ||
- ./packages/slate-cli/node_modules | ||
- save-cache: | ||
key: slate-cli-cache | ||
paths: | ||
- ./packages/slate-cli/node_modules | ||
test: | ||
docker: | ||
- image: circleci/node:latest | ||
steps: | ||
- checkout | ||
- restore_cache: | ||
keys: | ||
- root-cache-{{ checksum "package-lock.json" }} | ||
- root-cache | ||
- restore_cache: | ||
keys: | ||
- slate-tools-cache-{{ checksum "./packages/slate-tools/package-lock.json" }} | ||
- slate-tools-cache | ||
- restore_cache: | ||
keys: | ||
- slate-theme-cache-{{ checksum "./packages/slate-theme/package-lock.json" }} | ||
- slate-theme-cache | ||
- restore_cache: | ||
keys: | ||
- slate-cli-cache-{{ checksum "./packages/slate-cli/package-lock.json" }} | ||
- slate-cli-cache | ||
- run: | ||
name: Test packages | ||
command: npm test | ||
|
||
deploy: | ||
docker: | ||
- image: circleci/node:latest | ||
steps: | ||
- checkout | ||
- restore_cache: | ||
keys: | ||
- root-cache-{{ checksum "package-lock.json" }} | ||
- root-cache | ||
- restore_cache: | ||
keys: | ||
- slate-tools-cache-{{ checksum "./packages/slate-tools/package-lock.json" }} | ||
- slate-tools-cache | ||
- restore_cache: | ||
keys: | ||
- slate-theme-cache-{{ checksum "./packages/slate-theme/package-lock.json" }} | ||
- slate-theme-cache | ||
- restore_cache: | ||
keys: | ||
- slate-cli-cache-{{ checksum "./packages/slate-cli/package-lock.json" }} | ||
- slate-cli-cache | ||
- run: | ||
name: Create slate-theme.zip | ||
command: cd packages/slate-theme && ./node_modules/.bin/slate zip | ||
- run: | ||
name: Create slate-src.zip | ||
command: node scripts/zip_src | ||
- run: | ||
name: Upload zips to AWS | ||
command: node scripts/aws_upload | ||
- run: | ||
name: Upload zips to the Github release | ||
command: node scripts/github_release | ||
- run: | ||
name: Purge Fastly cache | ||
command: curl -X PURGE https://sdks.shopifycdn.com/slate/latest/slate-theme.zip && curl -X PURGE https://sdks.shopifycdn.com/slate/latest/slate-src.zip | ||
|
||
workflows: | ||
version: 2 | ||
build-n-test-n-maybe-deploy: | ||
jobs: | ||
- build: | ||
filters: | ||
tags: | ||
only: /.*/ | ||
- test: | ||
requires: | ||
- build | ||
filters: | ||
tags: | ||
only: /.*/ | ||
- deploy: | ||
requires: | ||
- test | ||
filters: | ||
tags: | ||
only: /v[0-9]+(\.[0-9]+)*/ | ||
branches: | ||
ignore: /.*/ | ||
|
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
This file was deleted.
Oops, something went wrong.