Interview Prep/CI/CD/GitHub Actions and GitLab CI in Production

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.

All CI/CD questions Roadmap: GitLab CI/CD

More on GitHub Actions and GitLab CI in Production