v1.2.0: Advanced Testing & Permissions Scripts (16+ total scripts) (#7) #23
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: Lint Python Code | |
| on: | |
| pull_request: | |
| branches: [main] | |
| paths: | |
| - 'skill/scripts/**/*.py' | |
| - 'pyproject.toml' | |
| - '.github/workflows/lint.yml' | |
| push: | |
| branches: [main] | |
| paths: | |
| - 'skill/scripts/**/*.py' | |
| jobs: | |
| lint: | |
| name: Run Black and Ruff | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| cache: 'pip' | |
| - name: Install linting tools | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install black ruff | |
| - name: Run Black (formatter check) | |
| run: | | |
| echo "🎨 Checking code formatting with Black..." | |
| black --check --diff skill/scripts/ | |
| - name: Run Ruff (linter) | |
| run: | | |
| echo "🔍 Linting code with Ruff..." | |
| ruff check skill/scripts/ | |
| - name: Summary | |
| if: success() | |
| run: | | |
| echo "## ✅ All Linting Checks Passed" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "- ✅ Black: Code formatting is correct" >> $GITHUB_STEP_SUMMARY | |
| echo "- ✅ Ruff: No linting issues found" >> $GITHUB_STEP_SUMMARY |