-
Notifications
You must be signed in to change notification settings - Fork 1
100 lines (93 loc) · 2.5 KB
/
ci.yaml
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
name: Continuous Integration
on:
push:
branches:
- main
pull_request:
branches:
- main
types:
- opened
- synchronize
jobs:
static-analysis:
strategy:
matrix:
os:
- ubuntu-latest
node-version:
- 20.x
runs-on: ${{ matrix.os }}
steps:
- name: Checkout to ${{ github.ref }}
uses: actions/checkout@v4
- name: Setup turbo cache
uses: actions/cache@v4
with:
path: node_modules/.cache/turbo
key: ${{ matrix.os }}-node-${{ matrix.node-version }}-turbo-${{ github.sha }}
restore-keys: |
${{ matrix.os }}-node-${{ matrix.node-version }}-turbo-
- name: Install pnpm
uses: pnpm/action-setup@v3
with:
version: ^8.6.2
- name: Install node ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "pnpm"
- name: Install dependencies
run: pnpm install --ignore-scripts
- name: Lint types
run: pnpm lint:types
if: always()
- name: Lint semantic
run: pnpm lint:semantic
if: always()
- name: Lint format
run: pnpm lint:format
if: always()
- name: Lint commits
run: pnpm lint:commits
if: always()
runtime-compat:
strategy:
matrix:
os:
- ubuntu-latest
node-version:
- 18.x
- 20.x
include:
- os: windows-latest
node-version: 20.x
- os: macos-latest
node-version: 20.x
runs-on: ${{ matrix.os }}
steps:
- name: Checkout to ${{ github.ref }}
uses: actions/checkout@v4
- name: Setup turbo cache
uses: actions/cache@v4
with:
path: node_modules/.cache/turbo
key: ${{ matrix.os }}-node-${{ matrix.node-version }}-turbo-${{ github.sha }}
restore-keys: |
${{ matrix.os }}-node-${{ matrix.node-version }}-turbo-
- name: Install pnpm
uses: pnpm/action-setup@v3
with:
version: ^8.6.2
- name: Install node ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "pnpm"
- name: Install dependencies
run: pnpm install --ignore-scripts
- name: Build
run: pnpm build
- name: Unit test
run: pnpm test:unit
if: always()