-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (42 loc) · 1.27 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: Test
on:
pull_request:
branches:
- main
push:
branches:
- main
jobs:
test:
name: Test with eslint@${{ matrix.eslint-version }} on node@${{ matrix.node-version }} and ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: [18, 20]
eslint-version: [7, 8]
os: [ubuntu-latest]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Cache pnpm modules
uses: actions/cache@v3
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@v2
with:
version: 8
run_install: true
- name: Install eslint@${{ matrix.eslint-version }}
run: pnpm --filter eslint-config-test install eslint@${{ matrix.eslint-version }}
- name: Run eslint@${{ matrix.eslint-version }}
run: pnpm run test