Merge pull request #102 from randlee/sc/announce-v0.8.0 #444
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Version Audit | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - develop | |
| pull_request: | |
| branches: | |
| - main | |
| - develop | |
| jobs: | |
| audit-versions: | |
| name: Audit Version Consistency | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.14' | |
| - name: Install Python dependencies | |
| run: pip install pyyaml pydantic | |
| - name: Run version audit | |
| run: python3 ./scripts/audit-versions.py --verbose | |
| - name: Compare versions by package | |
| run: python3 ./scripts/compare-versions.py --by-package | |
| if: always() | |
| - name: Check for version mismatches | |
| run: | | |
| # Run audit and capture exit code | |
| python3 ./scripts/audit-versions.py > /tmp/audit.log 2>&1 || EXIT_CODE=$? | |
| # Check if any failures occurred | |
| if grep -q "check(s) failed" /tmp/audit.log; then | |
| echo "Version audit failed - mismatches detected" | |
| cat /tmp/audit.log | |
| exit 1 | |
| else | |
| echo "Version audit passed" | |
| cat /tmp/audit.log | |
| exit 0 | |
| fi | |
| validate-manifests: | |
| name: Validate Package Manifests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.14' | |
| - name: Install Python dependencies | |
| run: pip install pyyaml pydantic | |
| - name: Validate manifest YAML format | |
| run: | | |
| python3 -c " | |
| import yaml | |
| import sys | |
| from pathlib import Path | |
| issues = 0 | |
| for manifest in Path('packages').glob('*/manifest.yaml'): | |
| try: | |
| with open(manifest) as f: | |
| data = yaml.safe_load(f) | |
| if 'version' not in data: | |
| print(f'{manifest}: Missing version field') | |
| issues += 1 | |
| else: | |
| print(f'{manifest}: version={data[\"version\"]}') | |
| except Exception as e: | |
| print(f'{manifest}: Parse error - {e}') | |
| issues += 1 | |
| if issues > 0: | |
| sys.exit(1) | |
| " | |
| changelog-check: | |
| name: Check for CHANGELOGs | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.14' | |
| - name: Verify CHANGELOG files exist | |
| run: | | |
| python3 -c " | |
| import sys | |
| from pathlib import Path | |
| missing = 0 | |
| packages_dir = Path('packages') | |
| if not packages_dir.exists(): | |
| print('No packages directory found') | |
| sys.exit(0) | |
| for package in packages_dir.iterdir(): | |
| if package.is_dir(): | |
| changelog = package / 'CHANGELOG.md' | |
| if not changelog.exists(): | |
| print(f'Warning: Missing CHANGELOG.md in {package.name}') | |
| missing += 1 | |
| else: | |
| print(f'Found CHANGELOG.md in {package.name}') | |
| if missing > 0: | |
| print() | |
| print(f'Note: {missing} missing CHANGELOG(s) are warnings, not failures.') | |
| print('Please create CHANGELOG.md for consistency with semantic versioning.') | |
| " |