Răsfoiți Sursa

configure wercker pipeline

* use npm and yarn complexly
Yuki Takei 9 ani în urmă
părinte
comite
b884529b62
1 a modificat fișierele cu 15 adăugiri și 4 ștergeri
  1. 15 4
      wercker.yml

+ 15 - 4
wercker.yml

@@ -2,16 +2,21 @@ box: node:6.10
 
 
 test:
 test:
   steps:
   steps:
+    - script:
+      name: set yarn cache-folder
+      code: |
+        yarn config set cache-folder $WERCKER_CACHE_DIR/yarn
+
     - script:
     - script:
       name: install dependencies
       name: install dependencies
       code: |
       code: |
-        npm install -g npm@4
+        yarn global add npm@4
         npm install
         npm install
 
 
     - script:
     - script:
       name: print dependencies
       name: print dependencies
       code: |
       code: |
-        npm ls --depth=0
+        npm list --depth=0
 
 
     - script:
     - script:
       name: npm test
       name: npm test
@@ -20,16 +25,22 @@ test:
 
 
 build-prod:
 build-prod:
   steps:
   steps:
+  steps:
+    - script:
+      name: set yarn cache-folder
+      code: |
+        yarn config set cache-folder $WERCKER_CACHE_DIR/yarn
+
     - script:
     - script:
       name: install dependencies
       name: install dependencies
       code: |
       code: |
-        npm install -g npm@4
+        yarn global add npm@4
         npm install
         npm install
 
 
     - script:
     - script:
       name: print dependencies
       name: print dependencies
       code: |
       code: |
-        npm ls --depth=0
+        npm list --depth=0
 
 
     - script:
     - script:
       name: npm run build:prod
       name: npm run build:prod