Skip to content

Commit 0e4fbb5

Browse files
committed
Use pnpm for eslint workflow
1 parent 4e08a43 commit 0e4fbb5

File tree

1 file changed

+28
-3
lines changed

1 file changed

+28
-3
lines changed

.github/workflows/eslint.yml

+28-3
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,46 @@ on:
55
branches: [master]
66
paths:
77
- "**.ts"
8+
- "package.json"
9+
- "pnpm-lock.yaml"
10+
- ".eslintrc.json"
11+
- ".eslintignore"
812
- ".github/workflows/eslint.yml"
913
pull_request:
1014
branches: [master]
1115
paths:
1216
- "**.ts"
17+
- "package.json"
18+
- "pnpm-lock.yaml"
19+
- ".eslintrc.json"
20+
- ".eslintignore"
1321
- ".github/workflows/eslint.yml"
1422

1523
jobs:
1624
eslint:
1725
runs-on: ubuntu-latest
1826
steps:
1927
- uses: actions/checkout@v2
28+
29+
- name: pnpm cache
30+
uses: actions/cache@v2
31+
env:
32+
cache-name: cache-pnpm-store
33+
with:
34+
path: ~/.pnpm-store
35+
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.node }}-${{ hashFiles('**/.package.json') }}
36+
restore-keys: |
37+
${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.node }}-
38+
2039
- name: Setup Node.js
21-
uses: actions/setup-node@v1
40+
uses: actions/setup-node@v2
2241
with:
2342
node-version: 16
24-
- run: npm install
25-
- run: npm run eslint
43+
44+
- name: Setup pnpm
45+
uses: pnpm/action-setup@v2
46+
with:
47+
version: 6.2.1
48+
run_install: true
49+
50+
- run: pnpm run eslint

0 commit comments

Comments
 (0)