Skip to content

Commit 9956b1b

Browse files
authored
Add CI checks for lint, format, types, and build (#1) (#46)
* Add CI checks for lint, format, types, and build * Use Node 22 for CI checks * Use v5 GitHub Actions in CI
1 parent 1a9273d commit 9956b1b

2 files changed

Lines changed: 37 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
9+
jobs:
10+
checks:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Check out repository
15+
uses: actions/checkout@v5
16+
17+
- name: Set up Node.js
18+
uses: actions/setup-node@v5
19+
with:
20+
node-version: 22
21+
cache: npm
22+
23+
- name: Install dependencies
24+
run: npm ci
25+
26+
- name: Run ESLint
27+
run: npm run lint
28+
29+
- name: Check formatting
30+
run: npm run format:check
31+
32+
- name: Check types
33+
run: npm run types:check
34+
35+
- name: Build site
36+
run: npm run build

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"start": "next start",
99
"types:check": "fumadocs-mdx && next typegen && tsc --noEmit",
1010
"postinstall": "fumadocs-mdx",
11+
"format:check": "prettier --check .",
1112
"format": "prettier --write .",
1213
"lint": "eslint"
1314
},

0 commit comments

Comments
 (0)