ci: fix pnpm install (#51)

This commit is contained in:
shanyue 2021-03-11 21:16:38 +08:00 committed by GitHub
parent 837c1e7c35
commit 6bd7675231
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 12 additions and 1 deletions

View File

@ -9,6 +9,17 @@ jobs:
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- run: npm i pnpm@latest -g
- name: Cache pnpm modules
uses: actions/cache@v2
env:
cache-name: cache-pnpm-modules
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.node-version }}-${{ hashFiles('**/package.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.node-version }}-
- uses: pnpm/action-setup@v1.2.1
with:
version: latest
- run: pnpm install
- run: npm test