@@ -279,9 +279,241 @@ jobs:
279279 capabilities : " CAPABILITY_IAM"
280280 timeout-in-minutes : 90
281281
282+ test-changeset-formatting :
283+ runs-on : ubuntu-latest
284+ steps :
285+ - uses : actions/checkout@v4
286+
287+ - name : Configure AWS credentials
288+ uses : aws-actions/configure-aws-credentials@v4
289+ with :
290+ role-to-assume : ${{ secrets.AWS_ROLE_TO_ASSUME }}
291+ aws-region : us-east-1
292+
293+ - name : Create stack with multiple resource types for formatting test
294+ uses : aws-actions/aws-cloudformation-github-deploy@v2.0.0-beta
295+ with :
296+ name : test-formatting-${{ github.run_number }}
297+ template : formatting-test-template.yaml
298+ parameter-overrides : " Environment=test,BucketPrefix=format-test"
299+
300+ - name : Update stack to generate diverse change set
301+ id : update-stack
302+ uses : aws-actions/aws-cloudformation-github-deploy@v2.0.0-beta
303+ with :
304+ name : test-formatting-${{ github.run_number }}
305+ template : formatting-test-template-updated.yaml
306+ parameter-overrides : " Environment=prod,BucketPrefix=format-updated"
307+
308+ - name : Verify change set outputs
309+ run : |
310+ echo "Changes Count: ${{ steps.update-stack.outputs.changes-count }}"
311+ echo "Has Changes: ${{ steps.update-stack.outputs.has-changes }}"
312+ echo '${{ steps.update-stack.outputs.changes-summary }}' | jq .
313+
314+ test-markdown-output :
315+ runs-on : ubuntu-latest
316+ steps :
317+ - uses : actions/checkout@v4
318+
319+ - name : Configure AWS credentials
320+ uses : aws-actions/configure-aws-credentials@v4
321+ with :
322+ role-to-assume : ${{ secrets.AWS_ROLE_TO_ASSUME }}
323+ aws-region : us-east-1
324+
325+ - name : Create change set for markdown testing
326+ id : create-markdown-cs
327+ uses : aws-actions/aws-cloudformation-github-deploy@v2.0.0-beta
328+ with :
329+ mode : " create-only"
330+ name : test-markdown-${{ github.run_number }}
331+ template : markdown-test-template.yaml
332+ parameter-overrides : " Environment=test"
333+
334+ - name : Verify markdown output format
335+ run : |
336+ echo "Markdown Output:"
337+ echo '${{ steps.create-markdown-cs.outputs.changes-markdown }}'
338+
339+ if [[ '${{ steps.create-markdown-cs.outputs.changes-markdown }}' == *"## 📋 CloudFormation Change Set"* ]]; then
340+ echo "✅ Markdown header found"
341+ else
342+ echo "❌ Markdown header missing"
343+ exit 1
344+ fi
345+
346+ if [[ '${{ steps.create-markdown-cs.outputs.changes-markdown }}' == *"<details>"* ]]; then
347+ echo "✅ Collapsible sections found"
348+ else
349+ echo "❌ Collapsible sections missing"
350+ exit 1
351+ fi
352+
353+ test-event-streaming :
354+ runs-on : ubuntu-latest
355+ steps :
356+ - uses : actions/checkout@v4
357+
358+ - name : Configure AWS credentials
359+ uses : aws-actions/configure-aws-credentials@v4
360+ with :
361+ role-to-assume : ${{ secrets.AWS_ROLE_TO_ASSUME }}
362+ aws-region : us-east-1
363+
364+ - name : Deploy stack with event streaming
365+ id : deploy-with-events
366+ uses : aws-actions/aws-cloudformation-github-deploy@v2.0.0-beta
367+ with :
368+ name : test-events-${{ github.run_number }}
369+ template : event-streaming-test.yaml
370+ parameter-overrides : " Environment=test,DelaySeconds=30"
371+
372+ - name : Verify deployment completed
373+ run : |
374+ echo "Stack ID: ${{ steps.deploy-with-events.outputs.stack-id }}"
375+ aws cloudformation describe-stacks --stack-name test-events-${{ github.run_number }}
376+
377+ test-boolean-inputs :
378+ runs-on : ubuntu-latest
379+ strategy :
380+ matrix :
381+ test-case :
382+ - name : " string-true"
383+ fail-on-empty : " true"
384+ no-execute : " false"
385+ disable-rollback : " 1"
386+ - name : " boolean-true"
387+ fail-on-empty : true
388+ no-execute : false
389+ disable-rollback : true
390+ - name : " boolean-false"
391+ fail-on-empty : false
392+ no-execute : true
393+ disable-rollback : false
394+ steps :
395+ - uses : actions/checkout@v4
396+
397+ - name : Configure AWS credentials
398+ uses : aws-actions/configure-aws-credentials@v4
399+ with :
400+ role-to-assume : ${{ secrets.AWS_ROLE_TO_ASSUME }}
401+ aws-region : us-east-1
402+
403+ - name : Test boolean input parsing - ${{ matrix.test-case.name }}
404+ id : test-boolean
405+ uses : aws-actions/aws-cloudformation-github-deploy@v2.0.0-beta
406+ with :
407+ name : test-bool-${{ matrix.test-case.name }}-${{ github.run_number }}
408+ template : stack.yaml
409+ parameter-overrides : " Environment=test"
410+ fail-on-empty-changeset : ${{ matrix.test-case.fail-on-empty }}
411+ no-execute-changeset : ${{ matrix.test-case.no-execute }}
412+ disable-rollback : ${{ matrix.test-case.disable-rollback }}
413+ continue-on-error : true
414+
415+ - name : Verify boolean handling
416+ run : |
417+ echo "Test case: ${{ matrix.test-case.name }}"
418+ echo "Boolean inputs processed successfully"
419+
420+ test-enhanced-validation-errors :
421+ runs-on : ubuntu-latest
422+ steps :
423+ - uses : actions/checkout@v4
424+
425+ - name : Configure AWS credentials
426+ uses : aws-actions/configure-aws-credentials@v4
427+ with :
428+ role-to-assume : ${{ secrets.AWS_ROLE_TO_ASSUME }}
429+ aws-region : us-east-1
430+
431+ - name : Test multiple validation errors
432+ id : validation-test
433+ uses : aws-actions/aws-cloudformation-github-deploy@v2.0.0-beta
434+ with :
435+ name : test-validation-enhanced-${{ github.run_number }}
436+ template : multiple-validation-errors.yaml
437+ parameter-overrides : " Environment=test"
438+ continue-on-error : true
439+
440+ - name : Verify detailed error information
441+ run : |
442+ echo "Validation test completed (expected to fail)"
443+ echo "Enhanced error reporting should provide detailed validation failure information"
444+
445+ test-stack-id-retrieval :
446+ runs-on : ubuntu-latest
447+ steps :
448+ - uses : actions/checkout@v4
449+
450+ - name : Configure AWS credentials
451+ uses : aws-actions/configure-aws-credentials@v4
452+ with :
453+ role-to-assume : ${{ secrets.AWS_ROLE_TO_ASSUME }}
454+ aws-region : us-east-1
455+
456+ - name : Test stack creation with ID retrieval
457+ id : create-stack
458+ uses : aws-actions/aws-cloudformation-github-deploy@v2.0.0-beta
459+ with :
460+ name : test-stack-id-${{ github.run_number }}
461+ template : stack.yaml
462+ parameter-overrides : " Environment=test"
463+
464+ - name : Verify stack ID format
465+ run : |
466+ STACK_ID="${{ steps.create-stack.outputs.stack-id }}"
467+ echo "Stack ID: $STACK_ID"
468+
469+ if [[ $STACK_ID == arn:aws:cloudformation:* ]]; then
470+ echo "✅ Stack ID is in correct ARN format"
471+ else
472+ echo "❌ Stack ID format is incorrect: $STACK_ID"
473+ exit 1
474+ fi
475+
476+ aws cloudformation describe-stacks --stack-name "$STACK_ID"
477+
478+ test-execute-only-with-events :
479+ runs-on : ubuntu-latest
480+ steps :
481+ - uses : actions/checkout@v4
482+
483+ - name : Configure AWS credentials
484+ uses : aws-actions/configure-aws-credentials@v4
485+ with :
486+ role-to-assume : ${{ secrets.AWS_ROLE_TO_ASSUME }}
487+ aws-region : us-east-1
488+
489+ - name : Create change set
490+ id : create-cs
491+ uses : aws-actions/aws-cloudformation-github-deploy@v2.0.0-beta
492+ with :
493+ mode : " create-only"
494+ name : test-execute-events-${{ github.run_number }}
495+ template : event-streaming-test.yaml
496+ parameter-overrides : " Environment=test,DelaySeconds=20"
497+
498+ - name : Execute change set with event streaming
499+ id : execute-cs
500+ uses : aws-actions/aws-cloudformation-github-deploy@v2.0.0-beta
501+ with :
502+ mode : " execute-only"
503+ name : test-execute-events-${{ github.run_number }}
504+ execute-change-set-id : ${{ steps.create-cs.outputs.change-set-id }}
505+
506+ - name : Verify execution with events
507+ run : |
508+ echo "Execution completed with stack ID: ${{ steps.execute-cs.outputs.stack-id }}"
509+ aws cloudformation describe-stacks \
510+ --stack-name test-execute-events-${{ github.run_number }} \
511+ --query 'Stacks[0].StackStatus' \
512+ --output text
513+
282514 cleanup :
283515 runs-on : ubuntu-latest
284- needs : [test-create-and-execute, test-large-template, test-validation-error, test-execution-error, test-create-only-then-execute, test-drift-detection, test-long-running]
516+ needs : [test-create-and-execute, test-large-template, test-validation-error, test-execution-error, test-create-only-then-execute, test-drift-detection, test-long-running, test-changeset-formatting, test-markdown-output, test-event-streaming, test-boolean-inputs, test-enhanced-validation-errors, test-stack-id-retrieval, test-execute-only-with-events ]
285517 if : always()
286518 steps :
287519 - name : Configure AWS credentials
0 commit comments