Overview
In this fifth project status meeting, Alice and her team discuss a new reporting requirement: collecting unit-test results and code-coverage metrics, then storing them in a durable location. Since GitHub Actions limits artifact retention duration (default 90 days) and size, the team proposes using an AWS S3 bucket for long-term storage.By default, GitHub Actions artifacts expire after 90 days. AWS S3 provides virtually unlimited storage with configurable lifecycle rules.
Objectives
- Aggregate test reports and coverage files.
- Upload artifacts automatically to S3 at the end of each workflow run.
- Ensure security and cost-efficiency by applying proper lifecycle policies.
Proposed Workflow Job
- Run tests and generate artifacts.
- Cache or publish intermediate results.
- Upload final reports to S3.
Always store AWS credentials in GitHub Secrets. Never hard-code them in your workflow files.
Benefits
- Centralized, long-term storage for all test artifacts
- Fine-grained lifecycle policies (e.g., transition to Glacier)
- Cost control through S3 storage classes
Tool Comparison
| Resource | Use Case | Action Example |
|---|---|---|
| GitHub Actions Artifacts | Short-term CI/CD results | actions/upload-artifact |
| AWS S3 Bucket | Durable, long-term storage | aws s3 cp |
| AWS S3 Lifecycle Policies | Automated data transition to lower-cost tiers | Define in S3 console or via Terraform |
| aws-actions/configure-aws-credentials | Simplify AWS authentication in workflows | uses: aws-actions/configure-aws-credentials@v2 |