add tool adoptions #7
Workflow file for this run
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: Quality | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, reopened] | |
| push: | |
| branches: | |
| - main | |
| - release/* | |
| schedule: | |
| - cron: "17 3 * * 1" | |
| workflow_dispatch: | |
| jobs: | |
| static-analysis: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install QA dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install -e ".[qa]" | |
| - name: Ruff lint | |
| run: python -m ruff check . | |
| - name: Ruff format | |
| run: python -m ruff format --check . | |
| - name: Bandit security scan | |
| run: bandit -c pyproject.toml -r c_parser fortran_parser semantics x2py --severity-level medium --confidence-level medium | |
| - name: pip-audit dependency scan | |
| run: pip-audit . --cache-dir /tmp/pip-audit-cache | |
| - name: Vulture dead-code scan | |
| run: vulture | |
| - name: Radon complexity policy | |
| env: | |
| PR_BASE_SHA: ${{ github.event.pull_request.base.sha }} | |
| PUSH_BEFORE_SHA: ${{ github.event.before }} | |
| run: python tools/check_radon_policy.py --base-ref auto | |
| - name: Radon complexity report | |
| continue-on-error: true | |
| run: radon cc c_parser fortran_parser semantics x2py -n C -s --total-average | |
| - name: Radon maintainability report | |
| continue-on-error: true | |
| run: radon mi c_parser fortran_parser semantics x2py -s | |
| # Full-project mutation is intentionally parked for later bounded splitting. | |
| # The 2026-06-02 manual run exceeded the 3h GitHub Actions limit, so focused | |
| # subsystem campaigns remain the active mutation workflow for now. | |
| # mutation: | |
| # if: github.event_name == 'workflow_dispatch' | |
| # runs-on: ubuntu-latest | |
| # timeout-minutes: 180 | |
| # permissions: | |
| # contents: read | |
| # steps: | |
| # - name: Checkout repository | |
| # uses: actions/checkout@v4 | |
| # - name: Set up Python | |
| # uses: actions/setup-python@v5 | |
| # with: | |
| # python-version: "3.12" | |
| # - name: Install QA dependencies | |
| # run: | | |
| # python -m pip install --upgrade pip | |
| # python -m pip install -e ".[qa]" | |
| # - name: Run mutation tests | |
| # env: | |
| # PYTHONPATH: . | |
| # HYPOTHESIS_PROFILE: ci | |
| # run: python tools/run_mutmut.py run | |
| fuzz: | |
| if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install QA dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install -e ".[qa]" | |
| - name: Run bounded parser fuzz tests | |
| env: | |
| PYTHONPATH: . | |
| HYPOTHESIS_PROFILE: fuzz | |
| run: python -m pytest -q tests/property -m fuzz --hypothesis-show-statistics | |
| random-order: | |
| if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install QA dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install -e ".[qa]" | |
| - name: Run tests with a changing random seed | |
| env: | |
| PYTHONPATH: . | |
| run: python -m pytest -q -n auto --randomly-seed=${{ github.run_id }} | |
| # Benchmark workflow is intentionally parked for later activation. | |
| # benchmark: | |
| # if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' | |
| # runs-on: ubuntu-latest | |
| # timeout-minutes: 15 | |
| # permissions: | |
| # contents: read | |
| # steps: | |
| # - name: Checkout repository | |
| # uses: actions/checkout@v4 | |
| # - name: Set up Python | |
| # uses: actions/setup-python@v5 | |
| # with: | |
| # python-version: "3.12" | |
| # - name: Install QA dependencies | |
| # run: | | |
| # python -m pip install --upgrade pip | |
| # python -m pip install -e ".[qa]" | |
| # - name: Run parser benchmarks | |
| # env: | |
| # PYTHONPATH: . | |
| # run: python -m pytest -q tests/benchmarks -m benchmark --benchmark-only --benchmark-json=benchmark.json | |
| # - name: Upload benchmark report | |
| # uses: actions/upload-artifact@v4 | |
| # with: | |
| # name: parser-benchmark-${{ github.run_id }} | |
| # path: benchmark.json | |
| # retention-days: 90 |