-
Notifications
You must be signed in to change notification settings - Fork 10
36 lines (34 loc) · 970 Bytes
/
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
name: tests # runs unit and integration tests
on:
push:
branches-ignore: [main]
workflow_dispatch:
jobs:
linux-tests:
strategy:
matrix:
node: [10, 12, 14, 16]
fail-fast: false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node_version }}
cache: npm
- uses: ./.github/actions/redis
with:
redis-version: 6
- name: Cache node modules
id: cache-nodemodules
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
path: "**/node_modules"
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
- run: npm i
if: ${{ steps.cache-nodemodules.outputs.cache-hit != 'true' }}
- run: npm run build
- run: npm run test:unit
- run: npm run test:integration