Add VHS integration tests with Require assertions#144
Conversation
- Add Require assertions to all tapes for screen verification - Add command-mode.tape for command completion testing - Add CI workflow for VHS integration tests - Add test:vhs task to Taskfile - Remove redundant test-diff.tape, separate light theme to theme-light.tape
This comment was marked as resolved.
This comment was marked as resolved.
- Add missing Require assertion after :ec2/ navigation - Add LocalStack cleanup step to CI workflow
This comment was marked as resolved.
This comment was marked as resolved.
- Update docs/tapes/README.md with new tapes and test:vhs task - Add timeout-minutes: 5 to demo setup step
Pull Request ReviewThis PR adds VHS integration tests with ✅ Strengths
|
🔍 Code Quality ObservationsMinor Issues
|
🚀 Performance Considerations
🔒 Security Considerations
|
🧪 Test CoverageWhat's Covered:
Potential Gaps:
📝 RecommendationsHigh Priority
Medium Priority
Low Priority (Optional)
|
🎯 Suggested Improvements for CI Workflow# .github/workflows/integration-test.yml
jobs:
vhs-test:
runs-on: ubuntu-latest
timeout-minutes: 15 # Add global timeout
env:
# ... existing env vars ...
steps:
# ... existing steps ...
- name: Start LocalStack
run: |
docker run -d --name localstack -p 4566:4566 localstack/localstack:4.12.0
echo "Waiting for LocalStack..."
for i in $(seq 1 30); do
# Check EC2 and VPC services too
if curl -s http://localhost:4566/_localstack/health | grep -qE '"(s3|ec2|vpc)": "(available|running)"'; then
echo "LocalStack is ready"
sleep 2 # Brief delay for full initialization
exit 0
fi
sleep 1
done
echo "LocalStack failed to start"
exit 1
- name: Run VHS tapes
run: |
set -euo pipefail # Stricter error handling
for tape in docs/tapes/*.tape; do
echo "=========================================="
echo "Running: $tape"
echo "=========================================="
# Add timeout per tape
timeout 3m docker run --rm --network host \
-v "$(pwd)":/vhs \
-v ~/.aws:/root/.aws:ro \
-e AWS_ENDPOINT_URL=http://localhost:4566 \
-e AWS_EC2_METADATA_DISABLED=true \
ghcr.io/charmbracelet/vhs "$tape"
done |
✅ ConclusionThis is a high-quality PR that adds significant value:
Recommendation: ✅ Approve with minor suggestions The suggested improvements are not blockers - they're optimizations that can be addressed in this PR or a follow-up. The core implementation is solid and ready to merge. Great work on improving the test infrastructure! 🎉 Review completed by Claude Code - Analyzed 31 files (249 additions, 56 deletions) including:
|
Summary
Requireassertions to all VHS tapes for early failure detectioncommand-mode.tapefor testing command suggestions/tab completiondemo:record:theme-light,demo:record:command-mode,test:vhsTest plan
task test:vhsruns all tapes locally (Linux only)