-
Notifications
You must be signed in to change notification settings - Fork 10
35 lines (32 loc) · 931 Bytes
/
testing.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
name: Testing
on:
- push
jobs:
test:
name: Test
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14, 16, 18]
# https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs#example-expanding-configurations
include:
- node-version: 14
npm: 9
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
name: Setup Node.js environment ${{ matrix.node-version }}
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Update npm to v${{ matrix.npm }}
if: ${{ matrix.npm }}
run: npm install -g npm@${{ matrix.npm }}
- name: Install npm dependencies
run: npm ci
- name: Run format validation
run: npm run format
- name: Run linter validation
run: npm run lint
- name: Run unit tests
run: npm test