Loading...
Loading...
Configure GitHub Actions CI/CD workflows for automated testing, linting, and deployment. Use for CI/CD setup and quality automation. Skip if CI/CD configured or using different platform.
npx skill4agent add athola/claude-night-market workflow-setup/attune:upgrade-projectls -la .github/workflows/--helpfrom project_detector import ProjectDetector
detector = ProjectDetector(Path.cwd())
language = detector.detect_language()
required_workflows = {
"python": ["test.yml", "lint.yml", "typecheck.yml"],
"rust": ["ci.yml"],
"typescript": ["test.yml", "lint.yml", "build.yml"],
}
missing = detector.get_missing_configurations(language)pytest -vworkflows_dir = Path(".github/workflows")
workflows_dir.mkdir(parents=True, exist_ok=True)
for workflow in required_workflows[language]:
template = templates_dir / language / "workflows" / f"{workflow}.template"
output = workflows_dir / workflow
engine.render_file(template, output)
print(f"✓ Created: {output}")--help# Syntax check (requires act or gh CLI)
gh workflow list
# Or manually check YAML syntax
python3 -c "import yaml; yaml.safe_load(open('.github/workflows/test.yml'))"pytest -v# Good - pinned to major version
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
# Avoid - unpinned or outdated
- uses: actions/checkout@v2
- uses: actions/setup-python@latestpytest -vstrategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
os: [ubuntu-latest, macos-latest, windows-latest]pytest -v- uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: 'pip' # Cache pip dependenciespython --version# BAD - pipeline masks exit code
- run: |
make typecheck 2>&1 | grep -v "^make\["
echo "Typecheck passed" # Runs even if make failed!
# GOOD - use pipefail
- run: |
set -eo pipefail
make typecheck 2>&1 | grep -v "^make\["
# GOOD - capture exit code explicitly
- run: |
output=$(make typecheck 2>&1) || exit_code=$?
echo "$output" | grep -v "^make\[" || true
exit ${exit_code:-0}/pensive:shell-review/attune:upgrade-project --component workflows--helpSkill(attune:project-init)Skill(sanctum:pr-prep)--verbose