Merge pull request #33 from RafaelJohn9/dev #82
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: | |
| paths: | |
| - 'mpesa_sdk/**/*.py' | |
| - 'tests/**/*.py' | |
| - 'pyproject.toml' | |
| - '.github/workflows/code-quality.yml' | |
| pull_request: | |
| paths: | |
| - 'mpesa_sdk/**/*.py' | |
| - 'tests/**/*.py' | |
| - 'pyproject.toml' | |
| - '.github/workflows/code-quality.yml' | |
| jobs: | |
| ruff: | |
| 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.12' | |
| - name: Install uv | |
| run: pip install uv | |
| - name: Create virtual environment | |
| run: uv venv .venv | |
| - name: Install dependencies | |
| run: uv pip install -e '.[dev]' | |
| - name: Run Ruff | |
| run: uv run ruff check mpesa_sdk | |
| mypy: | |
| 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.12' | |
| - name: Install uv | |
| run: pip install uv | |
| - name: Create virtual environment | |
| run: uv venv .venv | |
| - name: Install dependencies | |
| run: uv pip install -e '.[dev]' | |
| - name: Run Mypy | |
| run: uv run mypy mpesa_sdk | |
| bandit: | |
| 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.12' | |
| - name: Install uv | |
| run: pip install uv | |
| - name: Create virtual environment | |
| run: uv venv .venv | |
| - name: Install dependencies | |
| run: uv pip install -e '.[dev]' | |
| - name: Run Bandit | |
| run: uv run bandit -r mpesa_sdk |