Skip to content

Commit 73450da

Browse files
committed
ci: add test job and preuninstall verification
- Add dedicated test job running bun test - Add preuninstall script test in test-postinstall job - Verify agents are properly removed after preuninstall - Use --ignore-scripts during install to avoid side effects Signed-off-by: leocavalcante <[email protected]>
1 parent 6fc9ef2 commit 73450da

File tree

1 file changed

+28
-2
lines changed

1 file changed

+28
-2
lines changed

.github/workflows/ci.yml

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,26 @@ jobs:
1818
bun-version: latest
1919

2020
- name: Install dependencies
21-
run: bun install
21+
run: bun install --ignore-scripts
2222

2323
- name: Check formatting and lint
24-
run: bunx biome check src/
24+
run: bun run lint
25+
26+
test:
27+
runs-on: ubuntu-latest
28+
steps:
29+
- uses: actions/checkout@v4
30+
31+
- name: Setup Bun
32+
uses: oven-sh/setup-bun@v2
33+
with:
34+
bun-version: latest
35+
36+
- name: Install dependencies
37+
run: bun install --ignore-scripts
38+
39+
- name: Run tests
40+
run: bun test
2541

2642
test-postinstall:
2743
runs-on: ubuntu-latest
@@ -42,3 +58,13 @@ jobs:
4258
test -f ~/.config/opencode/agents/opencoder-planner.md
4359
test -f ~/.config/opencode/agents/opencoder-builder.md
4460
echo "All agents installed successfully"
61+
62+
- name: Test preuninstall script
63+
run: node preuninstall.mjs
64+
65+
- name: Verify agents were removed
66+
run: |
67+
test ! -f ~/.config/opencode/agents/opencoder.md
68+
test ! -f ~/.config/opencode/agents/opencoder-planner.md
69+
test ! -f ~/.config/opencode/agents/opencoder-builder.md
70+
echo "All agents removed successfully"

0 commit comments

Comments
 (0)