Refactor: Remove settings and tools modules #17
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: CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - '*' | |
| pull_request: | |
| branches: | |
| - main | |
| - '*' | |
| env: | |
| PYTHONUNBUFFERED: "1" | |
| FORCE_COLOR: "1" | |
| jobs: | |
| lint-and-test: | |
| name: Python ${{ matrix.python-version }} on ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest] | |
| python-version: ["3.10", "3.11", "3.12"] | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: pip | |
| cache-dependency-path: | | |
| requirements.txt | |
| pyproject.toml | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| pip install -e ".[dev]" | |
| - name: Lint with ruff | |
| run: | | |
| ruff check . --output-format=github | |
| ruff format . --check | |
| - name: Check formatting with black | |
| run: black --check --diff . | |
| - name: Type check with mypy (if available) | |
| run: | | |
| if pip list | grep -q mypy; then | |
| mypy src/ --ignore-missing-imports | |
| else | |
| echo "mypy not installed, skipping type checking" | |
| fi | |
| continue-on-error: true | |
| - name: Run unit tests with coverage | |
| run: | | |
| pytest --cov=src --cov-report=xml --cov-report=term-missing -v | |
| - name: Upload coverage to Codecov | |
| if: matrix.python-version == '3.11' && matrix.os == 'ubuntu-latest' | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| file: ./coverage.xml | |
| fail_ci_if_error: false | |
| security: | |
| name: Security scan | |
| 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.11" | |
| cache: pip | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install safety bandit[toml] | |
| - name: Run safety check | |
| run: safety check --json | |
| continue-on-error: true | |
| - name: Run bandit security scan | |
| run: bandit -r src/ -f json | |
| continue-on-error: true |