Skip to content

feat: map reports category in build and packaging script #15

feat: map reports category in build and packaging script

feat: map reports category in build and packaging script #15

Workflow file for this run

name: Validate Workflows & Scripts
on:
pull_request:
branches:
- test
- main
paths:
- '.github/workflows/**'
- '.github/scripts/**'
push:
branches:
- 'test-**'
- 'feature/**'
- 'develop'
paths:
- '.github/workflows/**'
- '.github/scripts/**'
workflow_dispatch: # Allow manual trigger
jobs:
validate:
name: Validate Changes
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.11'
- name: Validate workflow YAML syntax
run: |
echo "πŸ” Validating workflow files..."
docker run --rm -v "$PWD:/repo" -w /repo \
rhysd/actionlint:1.7.12 \
-color \
.github/workflows/*.yml
echo "βœ… All workflow files have valid syntax"
- name: Validate Python syntax
run: |
echo "πŸ” Checking Python syntax..."
for script in .github/scripts/build/*.py .github/scripts/ai/*.py .github/scripts/ai/tasks/*.py .github/scripts/helpers/*.py .github/scripts/qmd-tools/*.py .github/scripts/*.py; do
if [ -f "$script" ]; then
echo " β€’ $script"
python -m py_compile "$script"
fi
done
echo "βœ… All Python scripts have valid syntax"
- name: Lint Python with ruff
run: |
echo "πŸ” Running ruff..."
pip install --quiet ruff
# Lint every .py under .github/scripts/ - fails the job on any issue.
# Style-only (no auto-fix). ruff defaults cover pyflakes + pycodestyle.
ruff check .github/scripts/
echo "βœ… ruff passed"
- name: Validation summary
if: success()
run: |
echo ""
echo "═══════════════════════════════════════════════════════════════"
echo "βœ… All validation checks passed!"
echo "═══════════════════════════════════════════════════════════════"
echo ""
echo "Validated:"
echo " β€’ Workflow YAML syntax (actionlint)"
echo " β€’ Python script syntax (py_compile)"
echo ""
- name: Validation failed
if: failure()
run: |
echo ""
echo "═══════════════════════════════════════════════════════════════"
echo "❌ Validation failed!"
echo "═══════════════════════════════════════════════════════════════"
exit 1