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