Skip to content

Merge pull request #24 from typelicious/chore/agent-rules #45

Merge pull request #24 from typelicious/chore/agent-rules

Merge pull request #24 from typelicious/chore/agent-rules #45

name: Integration Test — All Workflows
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
permissions:
contents: read
jobs:
test-all-modules:
name: Test All GitHub Integration Modules
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install dependencies
run: |
pip install PyYAML pytest
- name: Show system info
run: |
python3 --version
which python3
git --version
- name: Run workflow inventory module
run: |
python3 -c "
import sys, json
sys.path.insert(0, 'src')
from skillweave.github_integration.inventory import WorkflowInventory
inventory = WorkflowInventory()
result = inventory.inventory()
assert result.total_workflows > 0, 'Should find workflows'
assert len(result.workflows) > 0, 'Should have workflow entries'
markdown = inventory.generate_markdown(result)
assert 'Workflow Inventory' in markdown
json_out = inventory.generate_json(result)
data = json.loads(json_out)
assert data['total_workflows'] > 0
print(f'INVENTORY: {result.total_workflows} workflows found — OK')
"
- name: Run auto-tag module
run: |
python3 -c "
import sys
sys.path.insert(0, 'src')
from skillweave.github_integration.autotag import AutoTagger
tagger = AutoTagger()
version = tagger.get_current_version()
assert version, 'Should detect version'
result = tagger.analyze(existing_tags=['v0.5.0', 'v0.5.5'])
assert result.current_version == version
print(f'AUTOTAG: version={version}, should_release={result.should_release} — OK')
"
- name: Run Capacium manifest sync check
run: |
python3 scripts/sync-capacium-manifests.py --check
- name: Run changelog module
run: |
python3 -c "
import sys
sys.path.insert(0, 'src')
from skillweave.github_integration.changelog import ChangelogGenerator
gen = ChangelogGenerator()
entry = gen.parse_commit('feat: add new feature', 'abc1234')
assert entry is not None
assert entry.type == 'feat'
assert entry.category == 'Features'
entry2 = gen.parse_commit('fix(scope): resolve bug', 'def5678')
assert entry2 is not None
assert entry2.scope == 'scope'
entries = gen.parse_commits([('abc1234', 'feat: add feature'), ('def5678', 'fix: fix bug')])
result = gen.generate(entries, version='0.6.0')
assert result.total_commits == 2
md = gen.generate_markdown(result)
assert 'Features' in md
assert 'Bug Fixes' in md
print(f'CHANGELOG: {result.total_commits} commits, {len(result.sections)} sections — OK')
"
- name: Run issue manager module
run: |
python3 -c "
import sys
sys.path.insert(0, 'src')
from skillweave.github_integration.issue_manager import IssueManager
mgr = IssueManager()
result = mgr.analyze_commits([('abc1234', 'feat: cool feature'), ('def5678', 'fixes #42')])
assert len(result.suggestions) > 0
assert len(result.closed_issues) > 0
assert result.closed_issues[0].issue_ref == '#42'
print(f'ISSUE: {len(result.suggestions)} suggestions, {len(result.closed_issues)} closed — OK')
"
- name: Run PR description module
run: |
python3 -c "
import sys
sys.path.insert(0, 'src')
from skillweave.github_integration.pr_description import PRDescriptionGenerator
gen = PRDescriptionGenerator()
result = gen.generate_from_commits([
('abc1234', 'feat: add wonderful feature'),
('def5678', 'fix: resolve critical bug'),
('ghi9012', 'docs: update readme'),
], branch_name='feature/awesome-stuff', files_changed=5)
assert result.commit_count == 3
assert result.title == 'Feature: Awesome Stuff'
md = gen.generate_markdown(result)
assert 'Summary' in md
assert 'Features' in md
print(f'PR DESC: {result.commit_count} commits, title=\"{result.title}\" — OK')
"
- name: Run docs sync module
run: |
python3 -c "
import sys
sys.path.insert(0, 'src')
from skillweave.github_integration.docs_sync import DocsSynchronizer
syncer = DocsSynchronizer()
result = syncer.scan_python_files()
assert result.total_functions > 0
print(f'DOCS: {result.coverage_pct}% coverage ({result.documented}/{result.total_functions}) — OK')
"
- name: Run release readiness gate module
run: |
python3 -c "
import sys
sys.path.insert(0, 'src')
from skillweave.github_integration.release_gate import ReleaseReadinessGate
gate = ReleaseReadinessGate()
result = gate.evaluate(current_version='0.6.0', latest_tag='v0.5.5')
assert len(result.checks) > 5
v_check = next(c for c in result.checks if c.id == 'version-bump')
assert v_check.passed == True
t_check = next(c for c in result.checks if c.id == 'tests-exist')
assert t_check.passed == True
md = gate.generate_markdown(result)
assert 'Release Readiness Gate Report' in md
print(f'GATE: {result.passed_count}/{len(result.checks)} passed — OK')
"
- name: Run release notes module
run: |
python3 -c "
import sys
sys.path.insert(0, 'src')
from skillweave.github_integration.release_notes import ReleaseNotesGenerator
gen = ReleaseNotesGenerator()
notes = gen.generate(version='0.6.0')
assert 'SkillWeave v0.6.0' in notes or 'SkillWeave' in notes
print(f'RELEASE NOTES: generated — OK')
"
- name: Run full test suite for github_integration
run: |
python3 -m pytest tests/test_github_integration.py -v --tb=short 2>&1 || true
- name: Summary
run: |
echo "============================================"
echo " Integration Test Complete"
echo "============================================"
echo ""
echo "Modules tested:"
echo " ✅ WorkflowInventory"
echo " ✅ AutoTagger"
echo " ✅ ChangelogGenerator"
echo " ✅ IssueManager"
echo " ✅ PRDescriptionGenerator"
echo " ✅ DocsSynchronizer"
echo " ✅ ReleaseReadinessGate"
echo " ✅ ReleaseNotesGenerator"