Skip to content

Commit ab0697c

Browse files
committed
Add CI workflow
1 parent ed62b5a commit ab0697c

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

.github/workflows/ci.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: ['**']
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
lint-format:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v4
15+
16+
- name: Setup Node.js
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: '22'
20+
cache: 'yarn'
21+
22+
- name: Install dependencies
23+
run: yarn install --frozen-lockfile
24+
25+
- name: Run ESLint
26+
run: yarn lint
27+
28+
- name: Run Prettier check
29+
run: yarn format

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"build": "next build",
88
"start": "next start -p 3232",
99
"lint": "next lint",
10+
"lint:fix": "next lint --fix",
1011
"format": "prettier --check .",
1112
"format:fix": "prettier --write .",
1213
"analyze": "cross-env ANALYZE=true next build",

0 commit comments

Comments
 (0)