Skip to content

Commit

Permalink
debug 2
Browse files Browse the repository at this point in the history
Signed-off-by: David Anyatonwu <[email protected]>
  • Loading branch information
onyedikachi-david committed Sep 6, 2024
1 parent 1cfa710 commit f28b651
Showing 1 changed file with 19 additions and 5 deletions.
24 changes: 19 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -195,15 +195,17 @@ jobs:
export DISPLAY=:99
mkdir -p ./test_data/logs
echo "Starting screenpipe CLI..."
RUST_LOG=debug ./target/release/screenpipe --data-dir ./test_data --fps 1 &
RUST_LOG=debug ./target/release/screenpipe --data-dir ./test_data --fps 1 --disable-audio &
CLI_PID=$!
sleep 10
sleep 20 # Increase wait time to 20 seconds
echo "Checking if CLI is running:"
if ps -p $CLI_PID > /dev/null; then
echo "CLI is running with PID $CLI_PID"
else
echo "CLI process has died"
cat screenpipe_output.log
exit 1
fi
echo "Attempting to query health endpoint:"
Expand All @@ -227,28 +229,40 @@ jobs:
Write-Output "Environment variables:"
Get-ChildItem Env: | Where-Object { $_.Name -match 'DISPLAY|AUDIO' }
- name: Install FFmpeg (Windows)
if: matrix.os == 'windows-latest'
run: |
choco install ffmpeg -y
refreshenv
- name: Debug CLI execution (Windows)
if: matrix.os == 'windows-latest'
run: |
$env:RUST_LOG = "debug"
$env:PATH += ";C:\Program Files\FFmpeg\bin"
New-Item -ItemType Directory -Force -Path .\test_data\logs
Write-Output "Starting screenpipe CLI..."
Start-Process -FilePath .\target\release\screenpipe.exe -ArgumentList "--data-dir", ".\test_data", "--fps", "1" -NoNewWindow -PassThru -RedirectStandardOutput screenpipe_output.log -RedirectStandardError screenpipe_error.log
Start-Sleep -Seconds 10
Start-Process -FilePath .\target\release\screenpipe.exe -ArgumentList "--data-dir", ".\test_data", "--fps", "1", "--disable-audio" -NoNewWindow -PassThru -RedirectStandardOutput screenpipe_output.log -RedirectStandardError screenpipe_error.log
Start-Sleep -Seconds 20
Write-Output "Checking if CLI is running:"
$process = Get-Process screenpipe -ErrorAction SilentlyContinue
if ($process) {
Write-Output "CLI is running with PID $($process.Id)"
} else {
Write-Output "CLI process not found"
Get-Content screenpipe_output.log
Get-Content screenpipe_error.log
exit 1
}
Write-Output "Attempting to query health endpoint:"
try {
Invoke-RestMethod -Uri http://localhost:3030/health -ErrorAction Stop
$response = Invoke-RestMethod -Uri http://localhost:3030/health -ErrorAction Stop
$response | ConvertTo-Json
} catch {
Write-Output "Error querying health endpoint: $_"
exit 1
}
Write-Output "CLI output:"
Expand Down

0 comments on commit f28b651

Please sign in to comment.