47 / 48 · 16 CI/CD Pipelines · Quality Gates← prev⊞ allnext →☰ Read as one page
7.5Pipeline Configuration Tips for QA
Environment Variables for Test Configuration
env:
TEST_TIMEOUT: 30000 # Per-test timeout in milliseconds
RETRY_COUNT: 2 # Retries for infrastructure flakes
HEADLESS: true # Headless browser mode
SLOW_MO: 0 # No artificial delay
WORKERS: 4 # Parallel test workers
CI: true # Signal to test framework that we are in CI
Retry Logic for Flaky Infrastructure
Retries should handle infrastructure flakes (network timeouts, container startup delays), not mask test bugs.
- run: npx playwright test --retries=2
timeout-minutes: 30
continue-on-error: false
If a test consistently needs retries, quarantine it and fix the root cause.
Notifications
Send Slack/Teams messages on pipeline failure so the team responds quickly:
notify:
needs: [unit-tests, browser-tests]
if: failure()
runs-on: ubuntu-latest
steps:
- uses: slackapi/slack-github-action@v1
with:
payload: |
{
"text": "Pipeline failed on ${{ github.ref_name }}: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}