style: apply black formatting to cli.py #47
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] | |
| permissions: | |
| contents: read | |
| jobs: | |
| lint-and-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| cache: pip | |
| - name: Install | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -e ".[dev]" || pip install -e . | |
| pip install ruff black pytest pytest-cov pip-audit pyyaml | |
| - name: Lint | |
| run: ruff check . | |
| - name: Format check | |
| run: black --check . | |
| - name: Test with coverage | |
| run: pytest --cov=automaxfix --cov-report=term-missing --cov-fail-under=70 -q | |
| - name: pip-audit | |
| run: pip-audit --strict || true | |
| secret-scan: | |
| runs-on: ubuntu-latest | |
| steps: | |
| # Full history required for gitleaks-action on PRs (needs the | |
| # main-branch ancestor to compute the BASE_SHA..HEAD_SHA range). | |
| # TruffleHog scope is still constrained by base/head below. | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: gitleaks | |
| uses: gitleaks/gitleaks-action@v2 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: trufflehog | |
| uses: trufflesecurity/trufflehog@v3.81.10 | |
| with: | |
| path: ./ | |
| base: HEAD~1 | |
| head: HEAD | |
| extra_args: --only-verified | |
| sbom: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Generate SBOM | |
| run: | | |
| python -m pip install cyclonedx-bom | |
| cyclonedx-py environment --output-format json --output-file sbom.json || true | |
| - uses: actions/upload-artifact@v7 | |
| with: | |
| name: sbom | |
| path: sbom.json | |
| if-no-files-found: ignore |