-
Notifications
You must be signed in to change notification settings - Fork 198
44 lines (42 loc) · 991 Bytes
/
tests.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
name: Tests
on:
pull_request:
branches:
- main
jobs:
tests:
strategy:
matrix:
node: [ '14.x', '16.x', '18.x' ]
os: [ ubuntu-latest, windows-latest, macos-latest ]
runs-on: ${{ matrix.os }}
name: Node ${{ matrix.node }} - ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- run: |
git remote set-branches --add origin main
git fetch
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
- name: Install Dependencies
run: npm ci
env:
NODE_ENV: development
- name: Unit Tests
run: npm run test
env:
NODE_ENV: production
- name: Lockfile Lint Test
run: npm run test:lockfile
env:
NODE_ENV: production
- name: Git History Test
run: npm run test:git-history
env:
NODE_ENV: production
- name: Lint
run: npm run lint
env:
NODE_ENV: production