Skip to content

Commit 59fa48d

Browse files
ci(github): update integration test for CLI file editing
1 parent 04e1e23 commit 59fa48d

1 file changed

Lines changed: 14 additions & 3 deletions

File tree

.github/workflows/test.yml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,22 @@ jobs:
8888
key: ${{ runner.os }}-ollama
8989

9090
- name: Pull model
91-
run: ollama pull qwen2.5:0.5b
91+
run: ollama pull gemma3:1b
9292

93-
- name: Verify CLI run
93+
# Change year to 2025 so AI can edit it back to 2026
94+
- name: Setup test
9495
run: |
95-
output=$(timeout 90s code-ollama run qwen2.5:0.5b "Reply in one short sentence")
96+
sed -i 's/Copyright (c) 2026/Copyright (c) 2025/' LICENSE
97+
grep -F "2025" LICENSE
98+
99+
- name: Edit with CLI
100+
run: |
101+
output=$(timeout 90s code-ollama run gemma3:1b "Change the year from 2025 to 2026 in the LICENSE file")
96102
printf '%s\n' "$output"
97103
test -n "$output"
98104
! grep -F "Error:" <<< "$output"
105+
106+
- name: Verify edit
107+
run: |
108+
grep -F "Copyright (c) 2026" LICENSE
109+
! grep -F "2025" LICENSE || (echo "Year 2025 still present in LICENSE" && exit 1)

0 commit comments

Comments
 (0)