Enable npm caching in GitHub Actions
authorTim Düsterhus <duesterhus@woltlab.com>
Wed, 18 Aug 2021 14:44:01 +0000 (16:44 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Wed, 18 Aug 2021 14:52:51 +0000 (16:52 +0200)
.github/workflows/typescript.yml

index 587997f9bbe92061a264a93a559d0b48f1583b28..bdad08e28f5ef39500ecde943a776454dd375707 100644 (file)
@@ -14,11 +14,12 @@ jobs:
     strategy:
       fail-fast: false
     steps:
+    - uses: actions/checkout@v2
     - name: Set up node.js
       uses: actions/setup-node@v2
       with:
         node-version: "14"
-    - uses: actions/checkout@v2
+        cache: "npm"
     - run: npm install
     - run: npx tsc --noEmit
   eslint:
@@ -27,11 +28,12 @@ jobs:
     strategy:
       fail-fast: false
     steps:
+    - uses: actions/checkout@v2
     - name: Set up node.js
       uses: actions/setup-node@v2
       with:
         node-version: "14"
-    - uses: actions/checkout@v2
+        cache: "npm"
     - run: npm install
     - run: npx eslint .
   javascript_sync:
@@ -41,11 +43,12 @@ jobs:
     strategy:
       fail-fast: false
     steps:
+    - uses: actions/checkout@v2
     - name: Set up node.js
       uses: actions/setup-node@v2
       with:
         node-version: "14"
-    - uses: actions/checkout@v2
+        cache: "npm"
     - run: npm install
     - run: npx tsc
     - run: echo "::add-matcher::.github/diff.json"