How do you run integration tests against real cloud resources in CI safely?
AdvancedProductionGitHub Actions and GitLab CI in Production
Answer
Use a dedicated sandbox account or project with budget alarms and SCP guardrails, create resources with unique prefixes per run (ci-${RUN_ID}), tag them with TTL and owner, tear down in an if: always() step, and run a scheduled reaper that deletes anything older than N hours. Credentials via OIDC with a role limited to the sandbox. Prefer LocalStack/Testcontainers for most tests and reserve the real cloud for a small contract-level suite.
More on GitHub Actions and GitLab CI in Production
How do you organise reusable workflows for an organisation on GitHub?IntermediateHow do you reduce GitHub Actions minutes cost on private repos?IntermediateHow do you secure self-hosted runners?AdvancedHow do you design the GitHub Actions OIDC trust policy for AWS safely?AdvancedHow do you handle approvals and deployments across environments in GitHub Actions?IntermediateHow do you handle required checks when workflows use path filters or matrices?Advanced