This setup allows you to test GitHub Actions workflows locally using act and direct command execution.
!!! tip “Comprehensive act Guide” 📖 For detailed act usage, configuration, and troubleshooting, see: Local GitHub Actions Testing
./local-test.sh quick
This runs the same checks as CI without Docker overhead:
./local-test.sh list
# Test documentation job (fastest)
./local-test.sh job docs .github/workflows/ci.yml
# Test main test suite
./local-test.sh job test .github/workflows/ci.yml
# Test commit linting
./local-test.sh job commit-lint .github/workflows/commit-lint.yml
.actrc - act Configuration.secrets - Local SecretsAdd your tokens here:
GITHUB_TOKEN=ghp_your_token_here
CODECOV_TOKEN=your_codecov_token
TEST_PYPI_API_TOKEN=pypi-your_test_token
PYPI_API_TOKEN=pypi-your_production_token
local-test.sh - Testing ScriptComplete testing automation with multiple modes.
| Command | Description | Speed | Docker Required |
|---|---|---|---|
quick |
Fast local tests | ⚡ Fastest | ❌ No |
list |
Show workflows/jobs | ⚡ Instant | ❌ No |
validate |
Check syntax | ⚡ Fast | ❌ No |
job <name> <file> |
Test specific job | 🐢 Slow | ✅ Yes |
basic |
Test basic workflows | 🐢 Slow | ✅ Yes |
python -m build.secrets fileAlready configured in .actrc:
--container-architecture linux/amd64
Use quick mode for development:
./local-test.sh quick
Most workflows work with dummy secrets for local testing. Only add real tokens if needed.
act commands# Before committing
./local-test.sh quick
# If all passes, commit
git add .
git commit -m "feat: your changes"
# Test the exact job that failed in CI
./local-test.sh job test .github/workflows/ci.yml
# Or run quick local equivalent
./local-test.sh quick
| Method | Time | Accuracy | Use Case |
|---|---|---|---|
quick |
~30s | 95% | Development |
act single job |
~2-5min | 98% | Debugging |
act full workflow |
~10-20min | 99% | Pre-release |
| GitHub CI | ~5-15min | 100% | Official |
quick for rapid development feedbackact for debugging specific workflow issues.secrets with real tokens only when necessaryvalidate to catch syntax errors early# 1. Make changes
vim biorythm/core.py
# 2. Quick test
./local-test.sh quick
# 3. Fix any issues
ruff format .
# 4. Test again
./local-test.sh quick
# 5. Commit when all passes
git add . && git commit -m "fix: improve core functionality"
# 1. Check what failed
gh run list --limit 5
# 2. Test specific job locally
./local-test.sh job test .github/workflows/ci.yml
# 3. Or run quick equivalent
./local-test.sh quick
This setup provides comprehensive local testing capabilities that match your GitHub Actions workflows while being significantly faster for development.