99
1010jobs :
1111 unit-test :
12- runs-on : ubuntu-latest
12+ runs-on : nixos
1313 steps :
1414 - uses : actions/checkout@v4
15-
15+
1616 - name : Setup bun
1717 uses : oven-sh/setup-bun@v1
1818 with :
3030 run : cd permissions && bun test test/
3131
3232 integration-test :
33- runs-on : ubuntu-latest
33+ runs-on : nixos
3434 needs : unit-test
3535 steps :
3636 - uses : actions/checkout@v4
@@ -40,24 +40,63 @@ jobs:
4040 cd permissions
4141 npm pack
4242 ls -la *.tgz
43-
43+
4444 - name : Install pi coding agent
4545 run : |
4646 npm install -g @earendil-works/pi-coding-agent
47-
47+
48+ - name : Install hf cli
49+ run : |
50+ curl -LsSf https://hf.co/cli/install.sh | bash
51+
52+ - name : Download model
53+ run : |
54+ hf download hugging-quants/Llama-3.2-1B-Instruct-Q8_0-GGUF --include "*"
55+
56+ - name : Install nix and llama-cpp
57+ run : |
58+ curl -L https://nixos.org/nix/install | sh
59+ nix profile install nixpkgs#llama-cpp
60+
61+ - name : Run llama-server
62+ run : |
63+ llama-server -hf hugging-quants/Llama-3.2-1B-Instruct-Q8_0-GGUF -c 107872 -ctk q8_0 -ctv q8_0 -fa 1 -n 32768 --temp 0.6 --top-p 0.95 --top-k 20 --repeat-penalty 1.00 --chat-template-kwargs '{"preserve_thinking": true}' --batch-size 2048 --ubatch-size 2048 --prio 2 --no-mmap --threads 8 -ngl 99 --parallel 1 --port 8080 &
64+ sleep 10
65+
66+ - name : Configure model in models.json
67+ run : |
68+ mkdir -p ~/.pi/agent
69+ cat > ~/.pi/agent/models.json << EOF
70+ {
71+ "providers": {
72+ "llama-cpp": {
73+ "baseUrl": "http://127.0.0.1:8080/v1",
74+ "api": "openai-completions",
75+ "apiKey": "none",
76+ "models": [
77+ {
78+ "id": "hugging-quants/Llama-3.2-1B-Instruct-Q8_0-GGUF",
79+ "name": "Llama-3.2-1B-Instruct-Q8_0-GGUF",
80+ "contextWindow": 107872
81+ }
82+ ]
83+ }
84+ }
85+ }
86+ EOF
87+
4888 - name : Add extension to agent
4989 run : |
5090 mkdir -p ~/.pi/agent/extensions
5191 cd permissions
5292 tar -xzf *.tgz -C ~/.pi/agent/extensions
5393
94+ - name : Verify pi can talk to me
95+ run : |
96+ pi -p "Summarize this codebase"
97+ pi list
98+
5499 - name : Test allowed commands
55100 run : |
56- # Test allowed commands
57- echo "Testing allowed commands..."
58- cd permissions
59- bun test test/
60-
61- # Verify extension is loaded
62- echo "Verifying extension..."
63- ls ~/.pi/agent/extensions/
101+ pi -p "use ls to show me all files in this path"
102+ pi -p "tell me what version of grep we have here"
0 commit comments