feat: Comprehensive project improvements from 10-agent deep analysis #2
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: Tests | |
| on: | |
| push: | |
| branches: [main, develop] | |
| pull_request: | |
| branches: [main, develop] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| cache: 'pip' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| pip install -r requirements-dev.txt | |
| - name: Run linting | |
| run: | | |
| flake8 aiops/ --count --select=E9,F63,F7,F82 --show-source --statistics | |
| flake8 aiops/ --count --exit-zero --max-complexity=10 --statistics | |
| - name: Run type checking | |
| run: | | |
| mypy aiops/ --ignore-missing-imports || true | |
| - name: Run security scan | |
| run: | | |
| pip install bandit | |
| bandit -r aiops/ -ll -ii || true | |
| - name: Run tests with coverage | |
| run: | | |
| pytest aiops/tests/ \ | |
| --cov=aiops \ | |
| --cov-report=xml \ | |
| --cov-report=term-missing \ | |
| --cov-fail-under=70 \ | |
| -v | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v3 | |
| with: | |
| files: ./coverage.xml | |
| fail_ci_if_error: false |