-
Notifications
You must be signed in to change notification settings - Fork 470
37 lines (31 loc) · 996 Bytes
/
node.js.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
name: CI
on:
pull_request:
push:
branches-ignore: "dependabot/**"
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# Node.js 10 is required by jQuery infra
NODE_VERSION: [10.x, 18.x]
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Cache
uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v4.0.1
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ matrix.NODE_VERSION }}-npm-lock-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-${{ matrix.NODE_VERSION }}-npm-lock-
- name: Use Node.js ${{ matrix.NODE_VERSION }}
uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
with:
node-version: ${{ matrix.NODE_VERSION }}
- name: Install npm dependencies
run: npm install
- name: Run test
run: npm run ci