cd ~/projects/digitaldrywood/github-integration-testing-demo
git init
git add .
git commit -m "Initial commit - GitHub Actions integration testing demo"- Go to https://github.com/new
- Repository name:
github-integration-testing-demo - Description: "Demo repository showing GitHub Actions integration testing with manual triggers"
- Choose: Public or Private
- DO NOT initialize with README, .gitignore, or license (we already have them)
- Click "Create repository"
# Add your remote (replace with your actual repository URL)
git remote add origin https://github.com/digitaldrywood/github-integration-testing-demo.git
# Push to GitHub
git branch -M main
git push -u origin main- Go to your repo on GitHub
- Click Settings → Environments
- Click New environment
- Name:
integration-testing - Click Configure environment
- Add Protection Rules (optional):
- ✅ Required reviewers: Add your GitHub username
- 🕐 Wait timer: 0-5 minutes (optional)
- Click Save protection rules
- Click New environment
- Name:
production-integration - Configure with stricter rules:
- ✅ Required reviewers: Add multiple maintainers
- 🕐 Wait timer: 5-10 minutes
- 🌿 Deployment branches: Only from
main
Go to Settings → Secrets and variables → Actions
# S3 Testing (use your AWS credentials or create IAM user)
AWS_ACCESS_KEY_ID: your-access-key
AWS_SECRET_ACCESS_KEY: your-secret-key
AWS_REGION: us-east-1
TEST_S3_BUCKET: your-test-bucket-name
# API Testing (optional, can use dummy values)
API_KEY: your-api-key
API_ENDPOINT: https://api.example.com
# Database is using GitHub Actions service container
# No secrets needed for basic testing- Make a small change to README.md
- Commit and push
- Check Actions tab - CI workflow should run automatically
- Go to Actions tab
- Click Manual Integration Tests
- Click Run workflow
- Select options:
- Leave PR number empty
- Check "Run S3 integration tests"
- Click Run workflow
- If you configured approval, approve when prompted
# Install dependencies
make deps
# Run unit tests
make test
# Setup local environment (requires Docker)
make setup-local
source .env.test
# Run integration tests locally
make test-integration
# Cleanup
make teardown-local- Repository created on GitHub
- Code pushed to repository
- GitHub Actions enabled (should be by default)
-
integration-testingenvironment created - Protection rules configured (optional)
- Secrets added
- CI workflow runs on push
- Manual workflow appears in Actions tab
- Manual workflow can be triggered
- Approval flow works (if configured)
- Automatic CI - Push code, see tests run
- Manual Triggers - Run integration tests on demand
- PR Testing - Test specific PRs by number
- Environment Protection - Require approval for sensitive tests
- Selective Testing - Choose which integration tests to run
- Secret Management - Secure credential handling
- Local Testing - Run same tests locally with Docker
- Make sure workflow files are in
.github/workflows/ - Check YAML syntax (use yamllint.com)
- Ensure Actions are enabled in repository settings
- Environment name must match exactly (case-sensitive)
- User must have write access to repository
- Required reviewers must have repository access
- Secret names are case-sensitive
- Check they're added to correct repository
- Environment secrets override repository secrets
- Check AWS credentials are valid
- Ensure S3 bucket exists and is accessible
- For local testing, ensure Docker is running
- Customize tests - Add your own integration tests
- Add badges - Show test status in README
- Branch protection - Require tests to pass before merge
- Notifications - Add Slack/Discord notifications
- Matrix testing - Test multiple Go versions
- Caching - Speed up workflows with dependency caching