-
Notifications
You must be signed in to change notification settings - Fork 2
55 lines (46 loc) · 1.23 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
name: CI
on:
push:
branches:
- main
- next
pull_request:
jobs:
build:
name: 'Validate with Node v${{ matrix.node_version }}'
runs-on: ubuntu-latest
strategy:
matrix:
node_version: ['16.17.0', '18.16.0']
steps:
- name: Checkout branch
uses: actions/checkout@v2
- name: Setup Node with v${{ matrix.node_version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node_version }}
cache: npm
- name: Install dependencies
run: npm ci
# Test hypothesis
# https://github.com/vercel/turborepo/issues/451#issuecomment-1190876871
- name: Restore cache
uses: actions/cache@v2
with:
path: |
**/.eslintcache
**/.turbo
node_modules/.cache/turbo
key:
${{ runner.os }}-node${{ matrix.node_version }}-test-v1-${{
github.sha }}
restore-keys: |
${{ runner.os }}-node${{ matrix.node_version }}-test-v1-
- name: Build packages
run: npm run build
- name: Lint
run: npm run lint
- name: Type check
run: npm run type-check
- name: Test
run: npm run test