Skip to content

Commit 672331f

Browse files
ci(github): verify packaged cli via npm exec in test.yml
1 parent ced56f8 commit 672331f

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

.github/workflows/test.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,16 @@ jobs:
4949
- name: Build package
5050
run: npm run build
5151

52+
- name: Verify CLI via npm exec
53+
run: |
54+
package_archive=$(npm pack | tail -n 1)
55+
temp_dir=$(mktemp -d)
56+
cd "$temp_dir"
57+
output=$(npm exec --yes --package "${GITHUB_WORKSPACE}/${package_archive}" code-ollama -- --help)
58+
printf '%s\n' "$output"
59+
grep -F "code-ollama" <<< "$output"
60+
grep -F "run <model> <prompt>" <<< "$output"
61+
5262
- name: Setup Ollama
5363
uses: ai-action/setup-ollama@v2
5464

0 commit comments

Comments
 (0)