Enhance your development workflow with our GitHub integration:
-
Automated test execution on pull requests
-
Status checks based on test results
-
Code coverage reporting
-
Branch protection rules integration
GitHub Integration
Integrate Spur tests into your CI/CD pipeline using GitHub Actions. You can find this on the Integrations page once you have connected Spur with Github
# 🚀 Spur GitHub Actions Workflow
name: Trigger Spur Webhook on Push 🔔!
on:
push:
branches:
- ext/spur/github
jobs:
trigger_webhook:
runs-on: ubuntu-latest
steps:
- name: 📡 Curl Request to Trigger TestSuites on Spur
run: |
curl -X POST \
-H "Content-Type: application/json" \
-H "SPUR_GITHUB_KEY: <YOUR_API_KEY>" \
-H "sha: ${{ github.sha }}" \
-H "repo: ${{ github.repository }}" \
-H "override_url: " \
"https://spurserverstagingep-aaeth2ftbteyhqed.z01.azurefd.net/api/integrations/github/webhook" \
-o response.txt -w "%{http_code}" > status.txt 2>&1 &
CURL_PID=$!
timeout=2400
elapsed=0
while kill -0 $CURL_PID 2>/dev/null; do
if [ $elapsed -ge $timeout ]; then
echo "Webhook trigger is still running after 40 minutes. Continuing..."
break
fi
sleep 60
elapsed=$((elapsed+60))
minutes=$((elapsed / 60))
echo "Still waiting for response... (${minutes} minutes elapsed)"
if [ -s response.txt ]; then
echo "Response received. Checking status..."
break
fi
done
if [ -s status.txt ]; then
STATUS=$(cat status.txt)
if [ "$STATUS" = "200" ]; then
echo "Webhook triggered successfully!"
else
echo "Webhook trigger status: $STATUS"
fi
cat response.txt
else
echo "Webhook trigger is still running. Check logs for final status."
fi
# Always exit successfully
exit 0
# 🎈 Happy testing with Spur! 🎈
We automatically generate the YAML configuration for your repository