-
Notifications
You must be signed in to change notification settings - Fork 64
62 lines (58 loc) · 1.54 KB
/
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: CI
on: [push, pull_request]
jobs:
types:
name: Types
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Install Node.js
uses: actions/setup-node@v2
with:
node-version: lts/*
- name: Install dependencies
run: npm install
- name: Check types
run: npm run tsd
lint:
name: Code style
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Install Node.js
uses: actions/setup-node@v2
with:
node-version: lts/*
- name: Install dependencies
run: npm install
- name: Check code style
run: npm run lint
test:
name: Tests
strategy:
matrix:
node-version: [14.x, 16.x, 17.x]
react-version: [17.x, 18.x]
include:
- node-version: 14.x
react-version: 16.0.0
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Install Node.js ${{matrix.node-version}}
uses: actions/setup-node@v2
with:
node-version: ${{matrix.node-version}}
- name: Install dependencies
run: npm install
- name: Install React ${{matrix.react-version}}
if: matrix.react-version != '18.x'
run: |
npm install --save-dev \
react@${{matrix.react-version}} \
react-dom@${{matrix.react-version}}
- name: Run tests
run: npm run tests-only