chore(ci): now using circleci 2.0 (#487)

This commit is contained in:
Jared Allard
2018-05-23 21:06:17 -07:00
committed by Caleb Boyd
parent 8dd5cf1973
commit 92fa19cba6
5 changed files with 60 additions and 10 deletions
+20
View File
@@ -0,0 +1,20 @@
#!/usr/bin/env bash
set -e
echo "setting up node to use latest lts"
export NVS_HOME="$HOME/.nvs"
git clone --depth=1 https://github.com/jasongin/nvs "$NVS_HOME"
. "$NVS_HOME/nvs.sh" install
nvs add lts
nvs link lts
nvs use default
echo "using node $(node --version)"
# Install latest yarn version
npm install -g yarn
echo "using yarn $(yarn --version)"
# Run yarn
yarn
+28
View File
@@ -0,0 +1,28 @@
version: 2
jobs:
test:
macos:
xcode: "9.0"
steps:
- checkout
- restore_cache:
keys:
- package-{{ checksum "package.json" }}-{{ checksum "yarn.lock" }}
- package- # Fallback for the latest package.json cache
- run:
name: configure-yarn
command: .circleci/bootstrap.sh
- save_cache:
key: package-{{ checksum "package.json" }}-{{ checksum "yarn.lock" }}
paths:
- node_modules
- run:
name: test
command: .circleci/test.sh
workflows:
version: 2
test:
jobs:
- test
+11
View File
@@ -0,0 +1,11 @@
#1/usr/bin/env bash
export NVS_HOME="$HOME/.nvs"
. "$NVS_HOME/nvs.sh" install
nvs link lts
nvs use default
set -e -x
yarn run asset-compile
-9
View File
@@ -1,9 +0,0 @@
dependencies:
override:
- export NVS_HOME="$HOME/.nvs" && git clone https://github.com/jasongin/nvs "$NVS_HOME" && . "$NVS_HOME/nvs.sh" install
- nvs add lts && nvs link lts && nvs use default
- npm i yarn -g
- yarn
test:
override:
- yarn run asset-compile
+1 -1
View File
@@ -11,7 +11,7 @@
"scripts": {
"asset-compile": "ts-node tasks/asset-compile",
"test": "mocha",
"fmt": "prettier --parser typescript --no-semi --print-width 100 --single-quote --write \"{src,plugins,tasks}/**/*.ts\"",
"fmt": "prettier --parser typescript --no-semi --print-width 100 --single-quote --write \"{src,plugins,tasks}/**/*.ts\"",
"prepare": "npm run build",
"prepublishOnly": "npm test",
"prebuild": "rimraf lib && npm run fmt",