Skip to content

Commit ea89e04

Browse files
committed
ci: add build and check on PR before merged
1 parent 34a1f6d commit ea89e04

1 file changed

Lines changed: 30 additions & 0 deletions

File tree

.github/workflows/check.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: check
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened]
6+
7+
jobs:
8+
format-and-build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout code
12+
uses: actions/checkout@v4
13+
with:
14+
fetch-depth: 0
15+
16+
- name: Setup Node.js
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: '20'
20+
cache: 'npm'
21+
cache-dependency-path: '**/package-lock.json'
22+
23+
- name: Install dependencies
24+
run: npm ci
25+
26+
- name: Format check
27+
run: npm run format.check
28+
29+
- name: Build
30+
run: npm run build

0 commit comments

Comments
 (0)