Skip to content

Commit 08dd25c

Browse files
authored
test: Gather and upload CI logs (#30)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Continuous Integration now captures and uploads build/test logs and system information as downloadable artifacts after each run. * Artifacts include service logs and integration test outputs, aiding post-run analysis and issue triage. * Logs are retained for 7 days and are available even when jobs fail, ensuring consistent access to diagnostic information. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
2 parents db3c99b + 8146c19 commit 08dd25c

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

.github/workflows/redhat-distro-container.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,45 @@ jobs:
7474
shell: bash
7575
run: ./tests/run_integration_tests.sh
7676

77+
- name: Gather logs and debugging information
78+
if: always()
79+
shell: bash
80+
run: |
81+
# Create logs directory
82+
mkdir -p logs
83+
84+
docker logs llama-stack > logs/llama-stack.log 2>&1 || echo "Failed to get llama-stack logs" > logs/llama-stack.log
85+
docker logs vllm > logs/vllm.log 2>&1 || echo "Failed to get vllm logs" > logs/vllm.log
86+
87+
# Gather system information
88+
echo "=== System information ==="
89+
{
90+
echo "Disk usage:"
91+
df -h
92+
echo "Memory usage:"
93+
free -h
94+
echo "Docker images:"
95+
docker images
96+
echo "Docker containers:"
97+
docker ps -a
98+
} > logs/system-info.log 2>&1
99+
100+
# Gather integration test logs if they exist
101+
echo "=== Integration test artifacts ==="
102+
if [ -d "/tmp/llama-stack-integration-tests" ]; then
103+
find /tmp/llama-stack-integration-tests -name "*.log" -o -name "pytest.log" -o -name "*.out" 2>/dev/null | while read -r file; do
104+
cp "$file" "logs/$(basename "$file")" || true
105+
done
106+
fi
107+
108+
- name: Upload logs as artifacts
109+
if: always()
110+
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.7.0
111+
with:
112+
name: ci-logs-${{ github.sha }}
113+
path: logs/
114+
retention-days: 7
115+
77116
- name: cleanup
78117
if: always()
79118
shell: bash

0 commit comments

Comments
 (0)