Skip to content

Commit 7ba5c52

Browse files
committed
feat: add linting github workflow
1 parent de3ed38 commit 7ba5c52

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

.github/workflows/lint.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Linting Check for Pull Requests
2+
#
3+
# This workflow runs code quality checks on all pull requests to ensure
4+
# consistent code style and catch potential issues before they're merged.
5+
# It uses Biome (via ultracite) for linting and TypeScript for type checking.
6+
#
7+
name: Lint
8+
9+
on:
10+
pull_request:
11+
branches: [ "main" ]
12+
push:
13+
branches: [ "main" ]
14+
merge_group:
15+
branches: [ "main" ]
16+
17+
permissions:
18+
contents: read
19+
pull-requests: write
20+
21+
jobs:
22+
lint:
23+
name: Lint Code
24+
runs-on: ubuntu-latest
25+
steps:
26+
- name: Checkout repository
27+
uses: actions/checkout@v4
28+
29+
- name: Setup Bun
30+
uses: oven-sh/setup-bun@v1
31+
with:
32+
bun-version: 1.2.19
33+
34+
- name: Cache dependencies
35+
uses: actions/cache@v3
36+
with:
37+
path: ~/.bun/install/cache
38+
key: ${{ runner.os }}-bun-${{ hashFiles('bun.lock') }}
39+
restore-keys: |
40+
${{ runner.os }}-bun-
41+
42+
- name: Install dependencies
43+
run: bun install --frozen-lockfile
44+
45+
- name: Run lint check
46+
run: bun run lint
47+
48+
- name: Run type check
49+
run: bun run check-types

0 commit comments

Comments
 (0)