|
| 1 | +# GitHub Actions Workflows |
| 2 | + |
| 3 | +This document provides an overview of the automated workflows configured for this repository. |
| 4 | + |
| 5 | +## Workflows Overview |
| 6 | + |
| 7 | +### 1. Python Lint (`python-lint.yml`) |
| 8 | + |
| 9 | +**Trigger:** Push or PR to main/develop branches with Python file changes |
| 10 | +**Status:** [](https://github.com/jcmrs/claude-code-spec-kit-subagent-plugin/actions/workflows/python-lint.yml) |
| 11 | + |
| 12 | +**Purpose:** Validates Python code quality and syntax in `spec-kit-partner/src/` |
| 13 | + |
| 14 | +**Steps:** |
| 15 | +1. Checks syntax errors with flake8 (strict) |
| 16 | +2. Runs style checks with flake8 (warnings) |
| 17 | +3. Analyzes code quality with pylint (warnings) |
| 18 | + |
| 19 | +**Configuration:** |
| 20 | +- Python version: 3.9 |
| 21 | +- Max line length: 127 characters |
| 22 | +- Max complexity: 10 |
| 23 | + |
| 24 | +--- |
| 25 | + |
| 26 | +### 2. Validate Plugin Manifests (`validate-manifests.yml`) |
| 27 | + |
| 28 | +**Trigger:** Push or PR to main/develop branches with manifest changes |
| 29 | +**Status:** [](https://github.com/jcmrs/claude-code-spec-kit-subagent-plugin/actions/workflows/validate-manifests.yml) |
| 30 | + |
| 31 | +**Purpose:** Ensures plugin manifests are valid and complete |
| 32 | + |
| 33 | +**Steps:** |
| 34 | +1. Validates `.claude-plugin/plugin.json` exists and is valid JSON |
| 35 | +2. Validates `.claude-plugin/marketplace.json` exists and is valid JSON |
| 36 | +3. Checks required fields in `plugin.json`: `name`, `version`, `description`, `author`, `license` |
| 37 | +4. Checks required fields in `marketplace.json`: `display_name`, `summary`, `description`, `categories`, `icon`, `publisher`, `license`, `version` |
| 38 | + |
| 39 | +--- |
| 40 | + |
| 41 | +### 3. Validate Referenced Assets (`validate-assets.yml`) |
| 42 | + |
| 43 | +**Trigger:** Push or PR to main/develop branches with manifest or asset changes |
| 44 | +**Status:** [](https://github.com/jcmrs/claude-code-spec-kit-subagent-plugin/actions/workflows/validate-assets.yml) |
| 45 | + |
| 46 | +**Purpose:** Verifies all referenced assets exist in the repository |
| 47 | + |
| 48 | +**Steps:** |
| 49 | +1. Checks icon exists (`assets/icon.png`) |
| 50 | +2. Checks README exists |
| 51 | +3. Validates all screenshots referenced in `marketplace.json` exist |
| 52 | + |
| 53 | +--- |
| 54 | + |
| 55 | +### 4. Lint Markdown and Mermaid (`lint-markdown-mermaid.yml`) |
| 56 | + |
| 57 | +**Trigger:** Push or PR to main/develop branches with Markdown or Mermaid changes |
| 58 | +**Status:** [](https://github.com/jcmrs/claude-code-spec-kit-subagent-plugin/actions/workflows/lint-markdown-mermaid.yml) |
| 59 | + |
| 60 | +**Purpose:** Validates Markdown and Mermaid syntax (content is not validated) |
| 61 | + |
| 62 | +**Steps:** |
| 63 | +1. Lints all Markdown files with markdownlint-cli (warnings only) |
| 64 | +2. Validates basic Mermaid diagram syntax |
| 65 | + |
| 66 | +**Configuration:** |
| 67 | +- Markdown rules: See `.markdownlint.json` |
| 68 | +- Mermaid: Basic syntax validation only |
| 69 | + |
| 70 | +--- |
| 71 | + |
| 72 | +### 5. Python Tests (`python-tests.yml`) |
| 73 | + |
| 74 | +**Trigger:** Push or PR to main/develop branches with Python or test file changes |
| 75 | +**Status:** [](https://github.com/jcmrs/claude-code-spec-kit-subagent-plugin/actions/workflows/python-tests.yml) |
| 76 | + |
| 77 | +**Purpose:** Runs automated tests to verify code functionality |
| 78 | + |
| 79 | +**Steps:** |
| 80 | +1. Runs basic test suite (`tests/test_basic.py`) |
| 81 | +2. Runs pytest on all test files |
| 82 | + |
| 83 | +**Test Coverage:** |
| 84 | +- Module import validation |
| 85 | +- Constants verification |
| 86 | +- Class existence checks |
| 87 | +- Basic functionality tests |
| 88 | + |
| 89 | +--- |
| 90 | + |
| 91 | +## Workflow Status |
| 92 | + |
| 93 | +All workflows must pass before a pull request can be merged. You can view the status of all workflows in the [Actions tab](https://github.com/jcmrs/claude-code-spec-kit-subagent-plugin/actions). |
| 94 | + |
| 95 | +## Local Testing |
| 96 | + |
| 97 | +Before pushing code, run these commands locally to catch issues early: |
| 98 | + |
| 99 | +```bash |
| 100 | +# Python linting |
| 101 | +flake8 spec-kit-partner/src --count --select=E9,F63,F7,F82 --show-source --statistics |
| 102 | + |
| 103 | +# JSON validation |
| 104 | +python3 -m json.tool .claude-plugin/plugin.json > /dev/null |
| 105 | +python3 -m json.tool .claude-plugin/marketplace.json > /dev/null |
| 106 | + |
| 107 | +# Tests |
| 108 | +python tests/test_basic.py |
| 109 | + |
| 110 | +# Markdown linting |
| 111 | +markdownlint '**/*.md' --ignore node_modules |
| 112 | +``` |
| 113 | + |
| 114 | +## Troubleshooting |
| 115 | + |
| 116 | +### Workflow Fails |
| 117 | + |
| 118 | +1. **Check the workflow logs** in the Actions tab |
| 119 | +2. **Run checks locally** using the commands above |
| 120 | +3. **Fix issues** and commit the fixes |
| 121 | +4. **Re-run the workflow** - it will run automatically on the new commit |
| 122 | + |
| 123 | +### Common Issues |
| 124 | + |
| 125 | +- **JSON syntax errors**: Make sure JSON files have no trailing commas or comments |
| 126 | +- **Missing assets**: Ensure all referenced files exist in the repository |
| 127 | +- **Python syntax errors**: Run flake8 locally to identify issues |
| 128 | +- **Import errors**: Verify all module dependencies are available |
| 129 | + |
| 130 | +## Adding New Workflows |
| 131 | + |
| 132 | +To add a new workflow: |
| 133 | + |
| 134 | +1. Create a new YAML file in `.github/workflows/` |
| 135 | +2. Follow the existing workflow structure |
| 136 | +3. Test locally before committing |
| 137 | +4. Update this documentation |
| 138 | + |
| 139 | +See [GitHub Actions documentation](https://docs.github.com/en/actions) for more information. |
0 commit comments