فهرست منبع

chore: ci update for pnpm actions

alvarosabu 1 سال پیش
والد
کامیت
9f521fbce7
2فایلهای تغییر یافته به همراه23 افزوده شده و 45 حذف شده
  1. 10 21
      .github/workflows/lint.yml
  2. 13 24
      .github/workflows/test.yml

+ 10 - 21
.github/workflows/lint.yml

@@ -9,33 +9,22 @@ jobs:
   lint:
     name: Lint
     runs-on: ubuntu-20.04
+    strategy:
+      matrix:
+        node-version: [16]
     steps:
       - name: Checkout
         uses: actions/checkout@v3
-
-      - name: setup caching
-        uses: actions/cache@v3
-        with:
-          path: ${{ env.PNPM_CACHE_FOLDER }}
-          key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
-          restore-keys: |
-            ${{ runner.os }}-pnpm-
-
-      - name: setup pnpm
-        uses: pnpm/action-setup@v2.2.4
+      - name: Setup pnpm
+        uses: pnpm/action-setup@v2
         with:
-          version: 7
-
-      - name: setup node.js
+          version: 8
+      - name: Use Node.js ${{ matrix.node-version }}
         uses: actions/setup-node@v3
         with:
-          node-version: 16.x
+          node-version: ${{ matrix.node-version }}
           cache: 'pnpm'
-
-      - name: setup pnpm config
-        run: pnpm config set store-dir $PNPM_CACHE_FOLDER
-
-      - run: pnpm install --no-frozen-lockfile --shamefully-hoist
-
+      - name: Install dependencies
+        run: pnpm install
       - name: Run Lint
         run: pnpm run lint

+ 13 - 24
.github/workflows/test.yml

@@ -1,4 +1,4 @@
-name: Run unit tests
+name: Run linters
 on: [push]
 
 env:
@@ -7,35 +7,24 @@ env:
 
 jobs:
   lint:
-    name: Run Unit Tests
+    name: Lint
     runs-on: ubuntu-20.04
+    strategy:
+      matrix:
+        node-version: [16]
     steps:
       - name: Checkout
         uses: actions/checkout@v3
-
-      - name: setup caching
-        uses: actions/cache@v3
-        with:
-          path: ${{ env.PNPM_CACHE_FOLDER }}
-          key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
-          restore-keys: |
-            ${{ runner.os }}-pnpm-
-
-      - name: setup pnpm
-        uses: pnpm/action-setup@v2.2.4
+      - name: Setup pnpm
+        uses: pnpm/action-setup@v2
         with:
-          version: 7
-
-      - name: setup node.js
+          version: 8
+      - name: Use Node.js ${{ matrix.node-version }}
         uses: actions/setup-node@v3
         with:
-          node-version: 16.x
+          node-version: ${{ matrix.node-version }}
           cache: 'pnpm'
-
-      - name: setup pnpm config
-        run: pnpm config set store-dir $PNPM_CACHE_FOLDER
-
-      - run: pnpm install --no-frozen-lockfile --shamefully-hoist
-
-      - name: Run Tests
+      - name: Install dependencies
+        run: pnpm install
+      - name: Run Unit Tests
         run: pnpm run test