Update README.md #5
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: Code Quality | |
| on: | |
| push: | |
| branches: [ main, develop ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.11' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install flake8 black isort bandit safety | |
| - name: Run Black (code formatting) | |
| run: black --check --diff src/ main.py | |
| - name: Run isort (import sorting) | |
| run: isort --check-only --diff src/ main.py | |
| - name: Run Flake8 (linting) | |
| run: flake8 src/ main.py --max-line-length=88 --extend-ignore=E203,W503 | |
| - name: Run Bandit (security) | |
| run: bandit -r src/ main.py -f json -o bandit-report.json || true | |
| - name: Run Safety (dependency security) | |
| run: | | |
| pip install -r requirements.txt | |
| safety check --json --output safety-report.json || true | |
| - name: Upload security reports | |
| uses: actions/upload-artifact@v3 | |
| if: always() | |
| with: | |
| name: security-reports | |
| path: | | |
| bandit-report.json | |
| safety-report.json |