Skip to content

Commit c4186bc

Browse files
committed
feat(ci): add test and typecheck gates to publish workflow
- Requires test and typecheck jobs to pass before publishing - Prevents publishing if tests or type checks fail - Improves release quality assurance 🤖 Generated with assistance of OhMyOpenCode (https://github.com/code-yeongyu/oh-my-opencode)
1 parent f5ce55e commit c4186bc

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

.github/workflows/publish.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,43 @@ permissions:
2424
id-token: write
2525

2626
jobs:
27+
test:
28+
runs-on: ubuntu-latest
29+
steps:
30+
- uses: actions/checkout@v4
31+
32+
- uses: oven-sh/setup-bun@v2
33+
with:
34+
bun-version: latest
35+
36+
- name: Install dependencies
37+
run: bun install
38+
env:
39+
BUN_INSTALL_ALLOW_SCRIPTS: "@ast-grep/napi"
40+
41+
- name: Run tests
42+
run: bun test
43+
44+
typecheck:
45+
runs-on: ubuntu-latest
46+
steps:
47+
- uses: actions/checkout@v4
48+
49+
- uses: oven-sh/setup-bun@v2
50+
with:
51+
bun-version: latest
52+
53+
- name: Install dependencies
54+
run: bun install
55+
env:
56+
BUN_INSTALL_ALLOW_SCRIPTS: "@ast-grep/napi"
57+
58+
- name: Type check
59+
run: bun run typecheck
60+
2761
publish:
2862
runs-on: ubuntu-latest
63+
needs: [test, typecheck]
2964
if: github.repository == 'code-yeongyu/oh-my-opencode'
3065
steps:
3166
- uses: actions/checkout@v4

0 commit comments

Comments
 (0)