@@ -12,11 +12,16 @@ jobs:
1212 steps :
1313 - uses : actions/checkout@v5
1414 - uses : austenstone/copilot-cli@notoken
15+ id : copilot
1516 with :
1617 prompt : " Say 'hello world' and nothing else."
1718 max-turns : 1
19+ - name : Verify exit code output
20+ run : |
21+ echo "Exit code: ${{ steps.copilot.outputs.exit-code }}"
22+ test "${{ steps.copilot.outputs.exit-code }}" = "0"
1823
19- # Test autopilot + max-turns limit
24+ # Test autopilot + max-turns limit with tool use
2025 autopilot :
2126 runs-on : ubuntu-latest
2227 steps :
2530 with :
2631 prompt : " Create a file called test.txt with the content 'autopilot works'. Then read it back to confirm."
2732 max-turns : 3
33+ - name : Verify file was created
34+ run : |
35+ test -f test.txt
36+ grep -q "autopilot works" test.txt
2837
29- # Test silent mode
38+ # Test silent mode — no usage stats in output
3039 silent :
3140 runs-on : ubuntu-latest
3241 steps :
6069 output-format : json
6170 max-turns : 1
6271
63- # Test tool deny list
72+ # Test tool deny list — shell should be blocked
6473 denied-tools :
6574 runs-on : ubuntu-latest
6675 steps :
@@ -105,18 +114,22 @@ jobs:
105114 denied-urls : " evil.com"
106115 max-turns : 2
107116
108- # Test share session to file
117+ # Test share session to file + verify output
109118 share :
110119 runs-on : ubuntu-latest
111120 steps :
112121 - uses : actions/checkout@v5
113122 - uses : austenstone/copilot-cli@notoken
123+ id : copilot
114124 with :
115125 prompt : " Say 'session sharing works'."
116126 share : true
117127 max-turns : 1
118- - name : Check share file exists
119- run : ls -la copilot-session-*.md || echo "No session file found"
128+ - name : Verify session file exists
129+ run : |
130+ echo "Session path: ${{ steps.copilot.outputs.session-path }}"
131+ test -f "${{ steps.copilot.outputs.session-path }}"
132+ cat "${{ steps.copilot.outputs.session-path }}"
120133
121134 # Test experimental flag
122135 experimental :
@@ -153,3 +166,37 @@ jobs:
153166 prompt : " What files are in this repo?"
154167 agent : explore
155168 max-turns : 2
169+
170+ # Test fail-on-error catches non-zero exit
171+ fail-on-error :
172+ runs-on : ubuntu-latest
173+ steps :
174+ - uses : actions/checkout@v5
175+ - uses : austenstone/copilot-cli@notoken
176+ id : copilot
177+ continue-on-error : true
178+ with :
179+ prompt : " Exit with error code 1 by running: exit 1"
180+ fail-on-error : true
181+ max-turns : 2
182+ - name : Verify exit code was captured
183+ run : |
184+ echo "Exit code: ${{ steps.copilot.outputs.exit-code }}"
185+ echo "Step outcome: ${{ steps.copilot.outcome }}"
186+
187+ # Test copilot-config is applied
188+ config :
189+ runs-on : ubuntu-latest
190+ steps :
191+ - uses : actions/checkout@v5
192+ - uses : austenstone/copilot-cli@notoken
193+ with :
194+ prompt : " Say 'config test passed'."
195+ copilot-config : |
196+ {
197+ "banner": "never",
198+ "render_markdown": false,
199+ "theme": "dark",
200+ "trusted_folders": []
201+ }
202+ max-turns : 1
0 commit comments