Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
120 changes: 120 additions & 0 deletions .github/workflows/docs-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
# Demo Workflow: Documentation Check
# This workflow shows how PM Command Center tracks documentation quality
# Great for demonstrating the Gap Analyzer integration

name: πŸ“š Documentation Check

on:
push:
paths:
- '**.md'
- 'docs/**'
pull_request:
paths:
- '**.md'
- 'docs/**'
workflow_dispatch:
inputs:
check_level:
description: 'Check thoroughness level'
required: true
default: 'standard'
type: choice
options:
- quick
- standard
- thorough

jobs:
check-readme:
name: πŸ“– README Quality
runs-on: ubuntu-latest

steps:
- name: πŸ“₯ Checkout code
uses: actions/checkout@v4

- name: πŸ” Check README exists
id: readme
run: |
if [ -f "README.md" ]; then
echo "exists=true" >> $GITHUB_OUTPUT
LINES=$(wc -l < README.md)
echo "lines=$LINES" >> $GITHUB_OUTPUT
else
echo "exists=false" >> $GITHUB_OUTPUT
echo "lines=0" >> $GITHUB_OUTPUT
fi

- name: πŸ“‹ Check required sections
run: |
echo "## πŸ“– README Analysis" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY

check_section() {
if grep -qi "$1" README.md 2>/dev/null; then
echo "| $2 | βœ… Found |" >> $GITHUB_STEP_SUMMARY
else
echo "| $2 | ⚠️ Missing |" >> $GITHUB_STEP_SUMMARY
fi
}

echo "| Section | Status |" >> $GITHUB_STEP_SUMMARY
echo "|---------|--------|" >> $GITHUB_STEP_SUMMARY

check_section "install" "Installation"
check_section "usage" "Usage"
check_section "feature" "Features"
check_section "license" "License"
check_section "contribut" "Contributing"

check-docs-structure:
name: πŸ“ Documentation Structure
runs-on: ubuntu-latest

steps:
- name: πŸ“₯ Checkout code
uses: actions/checkout@v4

- name: πŸ“Š Analyze documentation
run: |
echo "## πŸ“ Documentation Overview" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY

MD_COUNT=$(find . -name "*.md" -not -path "./node_modules/*" | wc -l)
echo "**Total Markdown files:** $MD_COUNT" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY

echo "### πŸ“„ Documentation Files" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
find . -name "*.md" -not -path "./node_modules/*" | head -20 | while read file; do
LINES=$(wc -l < "$file")
echo "- \`$file\` ($LINES lines)" >> $GITHUB_STEP_SUMMARY
done

- name: 🎯 PM Command Center Integration
run: |
echo "" >> $GITHUB_STEP_SUMMARY
echo "---" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "πŸ’‘ **Tip:** Use \`@pm /gaps\` to find issues with missing documentation" >> $GITHUB_STEP_SUMMARY

spell-check:
name: ✏️ Spell Check
runs-on: ubuntu-latest
continue-on-error: true

steps:
- name: πŸ“₯ Checkout code
uses: actions/checkout@v4

- name: ✏️ Check spelling
uses: crate-ci/typos@master
continue-on-error: true

- name: πŸ“Š Report
if: always()
run: |
echo "## ✏️ Spell Check Complete" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "Documentation quality is tracked in PM Command Center CI/CD view" >> $GITHUB_STEP_SUMMARY
79 changes: 79 additions & 0 deletions .github/workflows/feature-validation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# Demo Workflow: Feature Branch Validation
# This workflow demonstrates PM Command Center's CI/CD monitoring capabilities
# Triggers on feature branches to show active development tracking

name: πŸš€ Feature Validation

on:
push:
branches:
- 'feature/**'
- 'demo-*'
pull_request:
types: [opened, synchronize, reopened]

jobs:
validate:
name: πŸ“‹ Validate Feature
runs-on: ubuntu-latest

steps:
- name: πŸ“₯ Checkout code
uses: actions/checkout@v4

- name: πŸ“¦ Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'

- name: πŸ“š Install dependencies
run: npm ci

- name: πŸ” Run linter
run: npm run lint --if-present

- name: πŸ§ͺ Run unit tests
run: npm test --if-present

- name: πŸ—οΈ Build application
run: npm run build

- name: πŸ“Š Generate build summary
run: |
echo "## πŸš€ Feature Validation Complete" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "| Check | Status |" >> $GITHUB_STEP_SUMMARY
echo "|-------|--------|" >> $GITHUB_STEP_SUMMARY
echo "| Lint | βœ… Passed |" >> $GITHUB_STEP_SUMMARY
echo "| Tests | βœ… Passed |" >> $GITHUB_STEP_SUMMARY
echo "| Build | βœ… Passed |" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "Ready for PM review in **PM Command Center** 🎯" >> $GITHUB_STEP_SUMMARY

analyze:
name: πŸ“ˆ Code Analysis
runs-on: ubuntu-latest
needs: validate

steps:
- name: πŸ“₯ Checkout code
uses: actions/checkout@v4

- name: πŸ“¦ Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'

- name: πŸ“Š Count lines of code
run: |
echo "## πŸ“Š Code Statistics" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "| Metric | Value |" >> $GITHUB_STEP_SUMMARY
echo "|--------|-------|" >> $GITHUB_STEP_SUMMARY
JS_LINES=$(find src -name "*.js" -o -name "*.jsx" | xargs wc -l 2>/dev/null | tail -1 | awk '{print $1}' || echo "0")
echo "| JavaScript/JSX | $JS_LINES lines |" >> $GITHUB_STEP_SUMMARY
TS_LINES=$(find . -name "*.ts" -o -name "*.tsx" | xargs wc -l 2>/dev/null | tail -1 | awk '{print $1}' || echo "0")
echo "| TypeScript | $TS_LINES lines |" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "View this in **@pm /cicd** πŸ”§" >> $GITHUB_STEP_SUMMARY
175 changes: 175 additions & 0 deletions .github/workflows/release-candidate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,175 @@
# Demo Workflow: Release Candidate Check
# This workflow demonstrates PM Command Center's release tracking
# Shows how PMs can monitor release readiness via @pm /release

name: 🎯 Release Candidate

on:
push:
branches:
- 'release/**'
- 'rc/**'
tags:
- 'v*'
workflow_dispatch:
inputs:
version:
description: 'Release version (e.g., 1.0.0)'
required: true
type: string
skip_tests:
description: 'Skip test suite'
required: false
type: boolean
default: false

env:
NODE_VERSION: '20'

jobs:
preflight:
name: ✈️ Preflight Checks
runs-on: ubuntu-latest
outputs:
version: ${{ steps.version.outputs.version }}
is_prerelease: ${{ steps.version.outputs.is_prerelease }}

steps:
- name: πŸ“₯ Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: 🏷️ Determine version
id: version
run: |
if [ "${{ github.event.inputs.version }}" != "" ]; then
VERSION="${{ github.event.inputs.version }}"
elif [[ "${{ github.ref }}" == refs/tags/v* ]]; then
VERSION="${GITHUB_REF#refs/tags/v}"
else
VERSION="0.0.0-dev"
fi
echo "version=$VERSION" >> $GITHUB_OUTPUT

if [[ "$VERSION" == *"-"* ]]; then
echo "is_prerelease=true" >> $GITHUB_OUTPUT
else
echo "is_prerelease=false" >> $GITHUB_OUTPUT
fi

echo "## 🏷️ Version Info" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "**Version:** $VERSION" >> $GITHUB_STEP_SUMMARY

- name: πŸ“‹ Check release requirements
run: |
echo "## ✈️ Preflight Checklist" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "| Requirement | Status |" >> $GITHUB_STEP_SUMMARY
echo "|-------------|--------|" >> $GITHUB_STEP_SUMMARY

# Check package.json exists
if [ -f "package.json" ]; then
echo "| package.json | βœ… Found |" >> $GITHUB_STEP_SUMMARY
else
echo "| package.json | ❌ Missing |" >> $GITHUB_STEP_SUMMARY
fi

# Check README exists
if [ -f "README.md" ]; then
echo "| README.md | βœ… Found |" >> $GITHUB_STEP_SUMMARY
else
echo "| README.md | ⚠️ Missing |" >> $GITHUB_STEP_SUMMARY
fi

# Check for CHANGELOG
if [ -f "CHANGELOG.md" ]; then
echo "| CHANGELOG.md | βœ… Found |" >> $GITHUB_STEP_SUMMARY
else
echo "| CHANGELOG.md | ⚠️ Consider adding |" >> $GITHUB_STEP_SUMMARY
fi

build-and-test:
name: πŸ—οΈ Build & Test
runs-on: ubuntu-latest
needs: preflight
if: ${{ github.event.inputs.skip_tests != 'true' }}

steps:
- name: πŸ“₯ Checkout code
uses: actions/checkout@v4

- name: πŸ“¦ Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'

- name: πŸ“š Install dependencies
run: npm ci

- name: πŸ§ͺ Run test suite
run: npm test --if-present

- name: πŸ—οΈ Production build
run: npm run build
env:
NODE_ENV: production

- name: πŸ“¦ Archive build artifacts
uses: actions/upload-artifact@v4
with:
name: release-build-${{ needs.preflight.outputs.version }}
path: dist/
retention-days: 30

- name: πŸ“Š Build summary
run: |
echo "## πŸ—οΈ Build Results" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "| Metric | Value |" >> $GITHUB_STEP_SUMMARY
echo "|--------|-------|" >> $GITHUB_STEP_SUMMARY
if [ -d "dist" ]; then
SIZE=$(du -sh dist | cut -f1)
FILES=$(find dist -type f | wc -l)
echo "| Bundle Size | $SIZE |" >> $GITHUB_STEP_SUMMARY
echo "| Files | $FILES |" >> $GITHUB_STEP_SUMMARY
fi
echo "| Version | ${{ needs.preflight.outputs.version }} |" >> $GITHUB_STEP_SUMMARY

release-gate:
name: 🚦 Release Gate
runs-on: ubuntu-latest
needs: [preflight, build-and-test]
if: always()

steps:
- name: πŸ“Š Release readiness report
run: |
echo "## 🚦 Release Gate Status" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "**Version:** ${{ needs.preflight.outputs.version }}" >> $GITHUB_STEP_SUMMARY
echo "**Pre-release:** ${{ needs.preflight.outputs.is_prerelease }}" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY

echo "### Job Status" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "| Job | Status |" >> $GITHUB_STEP_SUMMARY
echo "|-----|--------|" >> $GITHUB_STEP_SUMMARY
echo "| Preflight | ${{ needs.preflight.result == 'success' && 'βœ… Passed' || '❌ Failed' }} |" >> $GITHUB_STEP_SUMMARY
echo "| Build & Test | ${{ needs.build-and-test.result == 'success' && 'βœ… Passed' || needs.build-and-test.result == 'skipped' && '⏭️ Skipped' || '❌ Failed' }} |" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "---" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "πŸ“Š **Track this release in PM Command Center**" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "- Web: Check the **Release Readiness** tab" >> $GITHUB_STEP_SUMMARY
echo "- Chat: \`@pm /release\` for milestone status" >> $GITHUB_STEP_SUMMARY
echo "- Chat: \`@pm /cicd\` for pipeline health" >> $GITHUB_STEP_SUMMARY

- name: 🚦 Gate decision
if: needs.preflight.result != 'success' || needs.build-and-test.result == 'failure'
run: |
echo "::error::Release gate failed - see summary for details"
exit 1
Loading