Skip to content

Commit 07b699b

Browse files
committed
Added more robust dependency checks
1 parent 6b4950a commit 07b699b

1 file changed

Lines changed: 18 additions & 6 deletions

File tree

.github/workflows/pr.yaml

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,12 @@ jobs:
103103

104104
- name: Load Docker image
105105
run: docker load -i /tmp/stream-webpage-${{ github.run_id }}.tar
106+
107+
- name: Install ffmpeg
108+
run: |
109+
echo "Installing FFmpeg..."
110+
sudo apt-get update
111+
sudo apt-get install -y ffmpeg
106112
107113
- name: Start stream-webpage container
108114
run: |
@@ -118,14 +124,21 @@ jobs:
118124
-e WEBPAGE_URL="https://www.youtube.com/embed/xuCn8ux2gbs?autoplay=1&loop=1&playlist=xuCn8ux2gbs" \
119125
stream-webpage:test-${{ github.run_id }}
120126
121-
- name: Setup FFmpeg
122-
uses: FedericoCarboni/setup-ffmpeg@v3
123-
id: setup-ffmpeg
124-
125127
- name: Wait for services to start
126128
run: |
127129
echo "Waiting for services to start..."
128130
sleep 60
131+
132+
- name: Test Stream Container Health Endpoint
133+
run: |
134+
echo "Testing stream container health endpoint..."
135+
response=$(curl -s http://localhost:8080/health)
136+
if [[ "$response" != *"\"status\":\"ok\""* ]]; then
137+
echo "Health check failed: $response"
138+
exit 1
139+
else
140+
echo "Health check passed"
141+
fi
129142
130143
- name: Test RTMP stream
131144
run: |
@@ -142,8 +155,7 @@ jobs:
142155
143156
# Use ffprobe to check stream properties
144157
echo "Checking stream properties with ffprobe..."
145-
echo "Using ffprobe from: ${{ steps.setup-ffmpeg.outputs.ffmpeg-path }}/ffprobe"
146-
timeout 30 "${{ steps.setup-ffmpeg.outputs.ffmpeg-path }}/ffprobe" -v quiet -print_format json -show_streams rtmp://localhost:1935/live/stream > stream_info.json 2>/dev/null || {
158+
timeout 30 "ffprobe" -v quiet -print_format json -show_streams rtmp://localhost:1935/live/stream > stream_info.json 2>/dev/null || {
147159
echo "Stream not available yet, checking container logs..."
148160
docker logs stream-webpage
149161
docker logs $(docker ps -q --filter ancestor=tiangolo/nginx-rtmp)

0 commit comments

Comments
 (0)