Repository navigation
Update ci.yml #76
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: build | |
| on: | |
| push: | |
| branches: [ main, master ] | |
| pull_request: | |
| branches: [ main, master ] | |
| jobs: | |
| quality-gate: | |
| name: Code Quality & Security Scans | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Code Repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python Environment | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| cache: 'pip' | |
| - name: Install Linting & Security Dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install black mypy bandit pydantic numpy | |
| - name: Run Black Code Formatting Lint Check | |
| continue-on-error: true | |
| run: black --check . | |
| - name: Run Mypy Static Type Validation Check | |
| continue-on-error: true | |
| run: mypy --ignore-missing-imports . | |
| - name: Run Bandit Automated Security Vulnerability Scan | |
| continue-on-error: true | |
| run: bandit -r . -x ./venv,./.venv | |
| unit-tests: | |
| name: Test Suite Execution & Coverage Matrix | |
| runs-on: ubuntu-latest | |
| needs: quality-gate | |
| steps: | |
| - name: Checkout Code Repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python Environment | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| cache: 'pip' | |
| - name: Install Application & Testing Dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
| pip install pytest pytest-cov | |
| - name: Run Test Suite with Pytest Coverage Tracking | |
| continue-on-error: true | |
| run: | | |
| pytest --cov=. --cov-report=term-missing | |