Integrating Qovr with GitHub Actions
A step-by-step guide to running Qovr tests in your GitHub Actions CI/CD pipeline.
Integrating Qovr with GitHub Actions
This guide shows you how to set up Qovr in your GitHub Actions workflow for automated E2E testing on every push and pull request.
Prerequisites
Step 1: Get Your API Key
Step 2: Add Secrets to GitHub
QOVR_API_KEY with your API keyQOVR_JOURNEY_ID with your journey IDStep 3: Create the Workflow
Create .github/workflows/e2e.yml:
name: E2E Testson:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run E2E Tests
run: |
RESPONSE=$(curl -X POST https://qovr.dev/api/journeys/${{ secrets.QOVR_JOURNEY_ID }}/run \
-H "Authorization: Bearer ${{ secrets.QOVR_API_KEY }}" \
-H "Content-Type: application/json")
RUN_ID=$(echo $RESPONSE | jq -r '.id')
echo "RUN_ID=$RUN_ID" >> $GITHUB_ENV
- name: Wait for Results
run: |
for i in {1..30}; do
RESULT=$(curl -s https://qovr.dev/api/runs/$RUN_ID \
-H "Authorization: Bearer ${{ secrets.QOVR_API_KEY }}")
STATUS=$(echo $RESULT | jq -r '.status')
if [ "$STATUS" = "pass" ]; then
echo "✅ Tests passed!"
exit 0
elif [ "$STATUS" = "fail" ]; then
echo "❌ Tests failed"
echo $RESULT
jq '.steps[] select(.status == "fail")'
exit 1
fi
sleep 10
done
echo "⏰ Timeout waiting for results"
exit 1
Step 4: Test Your Setup
Push a commit to trigger the workflow. You should see:
Pro Tips
Happy testing!
Part of the founding team at Qovr. Passionate about building tools that help developers ship with confidence.