-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (27 loc) · 926 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
name: CI
on: [push]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node: [16, 18, 20]
react: [16, 17, 18]
name: build (${{ matrix.node }} w/ React ${{ matrix.react }}
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- name: Install deps
run: npm ci
- name: Install React ${{ matrix.react }}
run: npm i react@${{ matrix.react }} react-dom@${{ matrix.react }}
# `@testing-library/react@13` dropped support for React 16 and 17 so to ensure that we run
# fine under React 18 we should upgrade it if we're testing React 18.
- name: Install testing-library react for React 18
if: matrix.react == '18'
run: npm i @testing-library/react@13
- name: Run tests
run: npm test