11# Infrastructure Testing Workflows
22
3- ## 🛡️ ** Approval-Gated Testing **
3+ ## 🛡️ ** Merge Queue Integration **
44
5- Infrastructure tests ** require PR approval ** to prevent accidental resource provisioning and manage costs .
5+ Infrastructure tests ** integrate with GitHub's merge queue ** to ensure only approved, tested code reaches ` main ` .
66
77### ** How It Works**
8- 1 . ** Create PR** → No tests run initially
9- 2 . ** Get approval** → Tests run automatically
10- 3 . ** Push changes** → Tests re-run automatically (if PR approved)
11- 4 . ** Manual trigger** → Use ` gh workflow run test-<cloud>.yml ` if needed
8+ 1 . ** Create PR** → Request review
9+ 2 . ** Get approval** → PR enters merge queue automatically
10+ 3 . ** Tests run** → Only affected cloud providers tested (smart path filtering)
11+ 4 . ** Auto-merge** → When tests pass, code merges to ` main `
12+ 5 . ** Manual trigger** → Use ` gh workflow run test-<cloud>.yml ` if needed
1213
1314
1415### ** What Gets Tested**
@@ -22,13 +23,19 @@ Infrastructure tests **require PR approval** to prevent accidental resource prov
2223
2324### ** Features**
2425- ✅ ** Granular path filtering** - Only tests infrastructure changes (excludes docs/README)
25- - ✅ ** Smart cloud detection** - Tests only affected clouds, or all clouds for shared changes
26- - ✅ ** Race condition prevention ** - One workflow per PR
27- - ✅ ** Parallel cloud testing ** - AWS/GCP/Azure run simultaneously
28- - ✅ ** Auto-retest ** - New pushes trigger tests if PR approved
26+ - ✅ ** Smart cloud detection** - Tests only affected clouds, or all clouds for shared changes
27+ - ✅ ** Merge queue integration ** - Automatic testing on approved PRs
28+ - ✅ ** Conflict resolution ** - Auto-retests when merge conflicts occur
29+ - ✅ ** Parallel cloud testing ** - AWS/GCP/Azure run simultaneously when needed
2930
3031## ** Setup Requirements**
3132
33+ ** Branch Protection + Merge Queue:**
34+ - Enable merge queue for ` main ` branch
35+ - Require PR approvals (dismisses stale approvals)
36+ - Add required status checks: ` AWS Tests ` , ` GCP Tests ` , ` Azure Tests `
37+
38+
3239** Repository Secrets:**
3340```
3441MATERIALIZE_LICENSE_KEY
@@ -43,11 +50,14 @@ TF_TEST_S3_BUCKET, TF_TEST_S3_REGION, TF_TEST_S3_PREFIX
4350GOOGLE_PROJECT, AWS_REGION
4451```
4552
46- ## ** Manual Override **
53+ ## ** Manual Testing **
4754
4855``` bash
49- # Run tests without approval (requires repo access )
56+ # Run individual cloud tests manually (for debugging/testing )
5057gh workflow run test-aws.yml --ref your-branch
5158gh workflow run test-gcp.yml --ref your-branch
5259gh workflow run test-azure.yml --ref your-branch
60+
61+ # Note: Manual runs bypass merge queue but still require proper authentication
62+ # Production merges should always go through the merge queue process
5363```
0 commit comments