-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (27 loc) · 731 Bytes
/
pr.yml
File metadata and controls
34 lines (27 loc) · 731 Bytes
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
name: PR
on:
pull_request:
jobs:
test:
name: Test
runs-on: ubuntu-latest
env:
node-version: 20.x
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Install NodeJS
uses: actions/setup-node@v3
with:
node-version: ${{ env.node-version }}
- name: Cache Node Modules
uses: actions/cache@v3
id: cache-node-modules
with:
path: node_modules
key: ${{ runner.OS }}-node${{ env.node-version }}-ci-${{ hashFiles('**/package-lock.json') }}
- name: Install Dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: npm install --ignore-scripts
- name: Run unit tests
run: npm run test