From f244a279bc0cdde588d0da4928daf92ea54499d7 Mon Sep 17 00:00:00 2001 From: Tema Smirnov Date: Wed, 11 Jan 2023 06:10:24 +0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=B7=20Update=20GitHub=20Actions=20work?= =?UTF-8?q?flow=20file?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 39 +++++++++++++++++++++++---------------- 1 file changed, 23 insertions(+), 16 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1b4bdd2..c2880fe 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,30 +7,37 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node-version: [12.x, 14.x, 16.x] + node-version: [14, 16, 18] name: Node.js ${{ matrix.node-version }} steps: - - uses: actions/checkout@v2 + - name: Checkout + uses: actions/checkout@v3 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v2 + uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} - - name: Cache Node.js modules (pnpm) - uses: actions/cache@v2 - env: - cache-name: cache-pnpm-modules + - name: Install pnpm + uses: pnpm/action-setup@v2 + id: pnpm-install with: - path: ~/.pnpm-store - key: ${{ runner.OS }}-${{ env.cache-name }}-node-${{ matrix.node-version }}- - restore-keys: | - ${{ runner.OS }}-${{ env.cache-name }}-node-${{ matrix.node-version }}- + version: 7 + run_install: false + + - name: Get pnpm store directory + id: pnpm-cache + shell: bash + run: | + echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT - # pnpm much faster and better than npm & yarn, check it out: https://pnpm.io/ - - uses: pnpm/action-setup@v2.0.1 + - name: Setup pnpm cache + uses: actions/cache@v3 with: - version: 6.7.2 + path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} + key: ${{ runner.os }}-pnpm-store-node-${{ matrix.node-version }} + restore-keys: | + ${{ runner.os }}-pnpm-store-node-${{ matrix.node-version }} - name: Install dependencies run: pnpm install @@ -38,8 +45,8 @@ jobs: # Here we will use pnpx to run executables, instead of running `npm run