summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAcid Chicken (硫酸鶏) <root@acid-chicken.com>2019-01-27 20:13:06 +0900
committerGitHub <noreply@github.com>2019-01-27 20:13:06 +0900
commit97385db5b5f5b606283fd2b1c404f7a815166c8d (patch)
tree9025cb17a5c1a5f58b8dc291a54b9e3d25defa48
parentMerge branch 'develop' of https://github.com/syuilo/misskey into develop (diff)
downloadmisskey-97385db5b5f5b606283fd2b1c404f7a815166c8d.tar.gz
misskey-97385db5b5f5b606283fd2b1c404f7a815166c8d.tar.bz2
misskey-97385db5b5f5b606283fd2b1c404f7a815166c8d.zip
Use yarn instead of npm on CircleCI
-rw-r--r--.circleci/config.yml30
1 files changed, 13 insertions, 17 deletions
diff --git a/.circleci/config.yml b/.circleci/config.yml
index 54dff6c3e4..6c064e0b49 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -29,18 +29,14 @@ jobs:
executor: default
steps:
- checkout
- - run:
- name: Ensure package-lock.json
- command: |
- [ ! -e package-lock.json ] && echo '{}' > package-lock.json
- restore_cache:
name: Restore npm package caches
keys:
- - npm-v1-arch-{{ arch }}-env-{{ .Environment.variableName }}-package-{{ checksum "package.json" }}-lock-{{ checksum "package-lock.json" }}-
- - npm-v1-arch-{{ arch }}-env-{{ .Environment.variableName }}-package-{{ checksum "package.json" }}-
- - npm-v1-arch-{{ arch }}-env-{{ .Environment.variableName }}-
- - npm-v1-arch-{{ arch }}-
- - npm-v1-
+ - yarn-v1-arch-{{ arch }}-env-{{ .Environment.variableName }}-package-{{ checksum "package.json" }}-lock-{{ checksum "yarn.lock" }}
+ - yarn-v1-arch-{{ arch }}-env-{{ .Environment.variableName }}-package-{{ checksum "package.json" }}-
+ - yarn-v1-arch-{{ arch }}-env-{{ .Environment.variableName }}-
+ - yarn-v1-arch-{{ arch }}-
+ - yarn-v1-
- run:
name: Install Dependencies
command: |
@@ -54,13 +50,13 @@ jobs:
- run:
name: Build
command: |
- node-gyp configure
- node-gyp build
- npm run build || (echo -e '\033[0;34mRebuild modules\033[0;39m' && ls -1A node_modules | grep '^[^@]' | xargs npm rebuild && ls -1A node_modules | grep '^@' | xargs -I%1 sh -c 'ls -1A node_modules/'%1' | xargs -P0 -I%2 npm rebuild node_modules/'%1'/%2' && npm run build)
- ls -1ARl node_modules > ls
+ yarn install
+ yarn autoclean
+ yarn build
+ [ ! -e yarn.lock ] && touch yarn.lock
- save_cache:
name: Cache npm packages
- key: npm-v1-arch-{{ arch }}-env-{{ .Environment.variableName }}-package-{{ checksum "package.json" }}-lock-{{ checksum "package-lock.json" }}-ls-{{ checksum "ls" }}
+ key: yarn-v1-arch-{{ arch }}-env-{{ .Environment.variableName }}-package-{{ checksum "package.json" }}-lock-{{ checksum "yarn.lock" }}
paths:
- node_modules
# - store_artifacts:
@@ -90,11 +86,11 @@ jobs:
- run:
name: Test
command: |
- npm run test
- ls -1ARl node_modules > ls
+ yarn test
+ [ ! -e yarn.lock ] && touch yarn.lock
- save_cache:
name: Cache npm packages
- key: npm-v1-arch-{{ arch }}-env-{{ .Environment.variableName }}-package-{{ checksum "package.json" }}-lock-{{ checksum "package-lock.json" }}-ls-{{ checksum "ls" }}
+ key: yarn-v1-arch-{{ arch }}-env-{{ .Environment.variableName }}-package-{{ checksum "package.json" }}-lock-{{ checksum "yarn.lock" }}
paths:
- node_modules