Bläddra i källkod

Cache yarn deps

Janic Duplessis 4 år sedan
förälder
incheckning
5ce65405c3
1 ändrade filer med 27 tillägg och 0 borttagningar
  1. 27
    0
      .github/workflows/ci.yml

+ 27
- 0
.github/workflows/ci.yml Visa fil

13
           node-version: 12.x
13
           node-version: 12.x
14
       - name: Install yarn
14
       - name: Install yarn
15
         run: npm install -g yarn
15
         run: npm install -g yarn
16
+      - name: Get yarn cache
17
+        id: yarn-cache
18
+        run: echo "::set-output name=dir::$(yarn cache dir)"
19
+      - uses: actions/cache@v1
20
+        with:
21
+          path: ${{ steps.yarn-cache.outputs.dir }}
22
+          key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
23
+          restore-keys: |
24
+            ${{ runner.os }}-yarn-
16
       - name: Install dependencies
25
       - name: Install dependencies
17
         run: yarn install
26
         run: yarn install
18
       - name: Run tests
27
       - name: Run tests
27
           node-version: 12.x
36
           node-version: 12.x
28
       - name: Install yarn
37
       - name: Install yarn
29
         run: npm install -g yarn
38
         run: npm install -g yarn
39
+      - name: Get yarn cache
40
+        id: yarn-cache
41
+        run: echo "::set-output name=dir::$(yarn cache dir)"
42
+      - uses: actions/cache@v1
43
+        with:
44
+          path: ${{ steps.yarn-cache.outputs.dir }}
45
+          key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
46
+          restore-keys: |
47
+            ${{ runner.os }}-yarn-
30
       - name: Install dependencies
48
       - name: Install dependencies
31
         run: yarn install
49
         run: yarn install
32
       - name: Build android example app
50
       - name: Build android example app
46
         run: gem install cocoapods
64
         run: gem install cocoapods
47
       - name: Install yarn
65
       - name: Install yarn
48
         run: npm install -g yarn
66
         run: npm install -g yarn
67
+      - name: Get yarn cache
68
+        id: yarn-cache
69
+        run: echo "::set-output name=dir::$(yarn cache dir)"
70
+      - uses: actions/cache@v1
71
+        with:
72
+          path: ${{ steps.yarn-cache.outputs.dir }}
73
+          key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
74
+          restore-keys: |
75
+            ${{ runner.os }}-yarn-
49
       - name: Install dependencies
76
       - name: Install dependencies
50
         run: yarn install
77
         run: yarn install
51
       - name: Install pods
78
       - name: Install pods