-
Notifications
You must be signed in to change notification settings - Fork 7
45 lines (35 loc) · 844 Bytes
/
ci.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
45
name: test
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
test:
runs-on: ubuntu-latest
env:
CI: true
NODE_ENV: test
strategy:
matrix:
node-version: ['12', '14', '16', '18']
name: test on nodejs ${{ matrix.node-version }}
steps:
- uses: actions/checkout@v2
- name: install node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- uses: bahmutov/npm-install@v1
- name: run tests
run: npm run ci
test-success:
name: Tests
if: ${{ always() }}
runs-on: ubuntu-latest
needs: test
steps:
- name: Check build matrix status
if: ${{ needs.test.result != 'success' }}
run: exit 1