Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 13 additions & 40 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,45 +61,33 @@ jobs:
with:
node-version-file: .node-version

- name: Start Mock Inference Server
id: mock-server
run: |
node script/mock-inference-server.mjs &
echo "pid=$!" >> $GITHUB_OUTPUT
# Wait for server to be ready
for i in {1..10}; do
if curl -s http://localhost:3456/health > /dev/null; then
echo "Mock server is ready"
break
fi
sleep 1
done
- name: Prepare Mock Copilot CLI
run: chmod +x script/mock-copilot-cli.mjs

- name: Test Local Action
id: test-action
uses: ./
with:
prompt: hello
endpoint: http://localhost:3456
copilot-cli-path: script/mock-copilot-cli.mjs
env:
GITHUB_TOKEN: ${{ github.token }}

- name: Print Output
id: output
run: echo "${{ steps.test-action.outputs.response }}"
env:
RESPONSE: ${{ steps.test-action.outputs.response }}
run: printf '%s\n' "$RESPONSE"

- name: Verify Output
env:
RESPONSE: ${{ steps.test-action.outputs.response }}
run: |
response="${{ steps.test-action.outputs.response }}"
if [[ -z "$response" ]]; then
if [[ -z "$RESPONSE" ]]; then
echo "Error: No response received"
exit 1
fi
echo "Response received: $response"

- name: Stop Mock Server
if: always()
run: kill ${{ steps.mock-server.outputs.pid }} || true
printf 'Response received: %s\n' "$RESPONSE"

test-action-prompt-file:
name: GitHub Actions Test with Prompt File
Expand All @@ -115,19 +103,8 @@ jobs:
with:
node-version-file: .node-version

- name: Start Mock Inference Server
id: mock-server
run: |
node script/mock-inference-server.mjs &
echo "pid=$!" >> $GITHUB_OUTPUT
# Wait for server to be ready
for i in {1..10}; do
if curl -s http://localhost:3456/health > /dev/null; then
echo "Mock server is ready"
break
fi
sleep 1
done
- name: Prepare Mock Copilot CLI
run: chmod +x script/mock-copilot-cli.mjs

- name: Create Prompt File
run: echo "hello" > prompt.txt
Expand All @@ -141,7 +118,7 @@ jobs:
with:
prompt-file: prompt.txt
system-prompt-file: system-prompt.txt
endpoint: http://localhost:3456
copilot-cli-path: script/mock-copilot-cli.mjs
env:
GITHUB_TOKEN: ${{ github.token }}

Expand All @@ -163,7 +140,3 @@ jobs:
exit 1
fi
echo "Response file content: $content"

- name: Stop Mock Server
if: always()
run: kill ${{ steps.mock-server.outputs.pid }} || true
34 changes: 0 additions & 34 deletions .licenses/npm/@hono/node-server.dep.yml

This file was deleted.

35 changes: 0 additions & 35 deletions .licenses/npm/@modelcontextprotocol/sdk.dep.yml

This file was deleted.

47 changes: 0 additions & 47 deletions .licenses/npm/accepts.dep.yml

This file was deleted.

34 changes: 0 additions & 34 deletions .licenses/npm/ajv-formats.dep.yml

This file was deleted.

36 changes: 0 additions & 36 deletions .licenses/npm/ajv.dep.yml

This file was deleted.

47 changes: 0 additions & 47 deletions .licenses/npm/body-parser.dep.yml

This file was deleted.

46 changes: 0 additions & 46 deletions .licenses/npm/bytes.dep.yml

This file was deleted.

Loading
Loading