Skip to content

Commit 159c0cc

Browse files
committed
feat: update CI workflow and simplify package.json scripts
1 parent 4ae29af commit 159c0cc

2 files changed

Lines changed: 59 additions & 3 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- '**'
7+
pull_request:
8+
9+
jobs:
10+
quick-check:
11+
if: github.ref != 'refs/heads/main' || github.event_name == 'pull_request'
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v6
16+
17+
- name: Setup Bun
18+
uses: oven-sh/setup-bun@v2
19+
with:
20+
bun-version: latest
21+
22+
- name: Install dependencies
23+
run: bun install --frozen-lockfile
24+
25+
- name: Type check
26+
run: bun run check
27+
28+
- name: Lint
29+
run: bun run lint
30+
31+
main-check:
32+
if: github.ref == 'refs/heads/main'
33+
runs-on: ubuntu-latest
34+
35+
steps:
36+
- uses: actions/checkout@v6
37+
38+
- name: Setup Bun
39+
uses: oven-sh/setup-bun@v2
40+
with:
41+
bun-version: latest
42+
43+
- name: Install dependencies
44+
run: bun install --frozen-lockfile
45+
46+
- name: Type check
47+
run: bun run check
48+
49+
- name: Lint
50+
run: bun run lint
51+
52+
- name: Build library
53+
run: bun run build
54+
55+
- name: Build storybook
56+
run: bun run storybook:build

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@
1515
"dev": "bun run storybook",
1616
"storybook": "storybook dev -p 6006",
1717
"storybook:build": "storybook build",
18-
"commit": "bun run format && git add . && cz",
19-
"format": "bun run check && biome check --fix",
18+
"commit": "git add . && cz",
19+
"lint": "biome lint --fix",
2020
"check": "tsc --noEmit",
21-
"build": "bun run format && rimraf dist && rollup -c",
21+
"build": "rimraf dist && rollup -c",
2222
"prepublishOnly": "bun run build"
2323
},
2424
"maintainers": [

0 commit comments

Comments
 (0)